Browse Source

IOSAD-121 Use constant for @"undefined".

IOSAD-121
Dirk Zimmermann 3 years ago
parent
commit
d44c3535c6
2 changed files with 5 additions and 3 deletions
  1. +3
    -2
      pEpObjCAdapter/PEPInternalSession.m
  2. +2
    -1
      pEpObjCAdapter/PEPSession.m

+ 3
- 2
pEpObjCAdapter/PEPInternalSession.m View File

@ -25,6 +25,7 @@
#import "NSNumber+PEPRating.h"
#import "NSMutableDictionary+PEP.h"
#import "PEPSync_Internal.h"
#import "PEPInternalConstants.h"
#import "key_reset.h"
@ -824,7 +825,7 @@ static NSDictionary *stringToRating;
[NSNumber numberWithInteger:PEPRatingMistrust]: @"mistrust",
[NSNumber numberWithInteger:PEPRatingB0rken]: @"b0rken",
[NSNumber numberWithInteger:PEPRatingUnderAttack]: @"under_attack",
[NSNumber numberWithInteger:PEPRatingUndefined]: @"undefined",
[NSNumber numberWithInteger:PEPRatingUndefined]: kUndefined,
};
NSMutableDictionary *stringToRatingMutable = [NSMutableDictionary
dictionaryWithCapacity:
@ -853,7 +854,7 @@ static NSDictionary *stringToRating;
if (stringRating) {
return stringRating;
} else {
return @"undefined";
return kUndefined;
}
}


+ 2
- 1
pEpObjCAdapter/PEPSession.m View File

@ -15,6 +15,7 @@
#import "PEPMessageUtil.h"
#import "NSNumber+PEPRating.h"
#import "NSError+PEP+Internal.h"
#import "PEPInternalConstants.h"
@implementation PEPSession
@ -365,7 +366,7 @@
{
PEPInternalSession *session = [PEPSessionProvider session];
if (session == nil) {
return @"undefined";
return kUndefined;
}
return [session stringFromRating:rating];
}


Loading…
Cancel
Save