Skip to content

Commit

Permalink
bug fix dell'ultimo secondo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lange99 committed Dec 18, 2020
1 parent cd60742 commit 1799f37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are 2 ways to enable a tag:

If the tag is not enabled and has never been read, in the event of an access attempt, it will have 3 possibilities to be enabled.
If it is not enabled within the third attempt, the tag will be blocked.

if a tag is enabled, it is removed from the blocked list and its attempts are reset

If a tag is blocked it is always possible to unlock it by enabling it.

Expand Down
5 changes: 4 additions & 1 deletion lib/NfcKeyManager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ class NfcManager {
if (availableKey.contains(tag.id) == true) {
availableKey.remove(tag.id);
if (attempts.containsKey(tag.id) == true){
attempts.remove(tag.id);
attempts.update(tag.id, (value) => 0);
}
if( deniedKey.contains(tag.id)== true){
deniedKey.remove(tag.id);
}
log.add(tag.id + ": tag enabled");
return 1;
Expand Down

0 comments on commit 1799f37

Please sign in to comment.