pEpObjCAdapter/PEPPassphraseCache.m
branchIOSAD-172
changeset 1547 516474ecf260
parent 1541 c6f4eab1ed95
child 1548 bd20f1a6c3cc
     1.1 --- a/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.2 +++ b/pEpObjCAdapter/PEPPassphraseCache.m	Mon Jun 29 16:39:43 2020 +0200
     1.3 @@ -83,12 +83,10 @@
     1.4      PEPPassphraseCacheEntry *entry = [[PEPPassphraseCacheEntry alloc]
     1.5                                        initWithPassphrase:passphrase];
     1.6      dispatch_sync(self.queue, ^{
     1.7 -        [self.mutablePassphraseEntries addObject:entry];
     1.8 +        [self.mutablePassphraseEntries insertObject:entry atIndex:0];
     1.9          if (self.mutablePassphraseEntries.count > s_maxNumberOfPassphrases) {
    1.10 -            [self.mutablePassphraseEntries removeObjectAtIndex:0];
    1.11 +            [self.mutablePassphraseEntries removeLastObject];
    1.12          }
    1.13 -
    1.14 -        [self sortPassphrases];
    1.15      });
    1.16  }
    1.17