Skip to content

Commit

Permalink
Better swift naming of some helpertools methods and nullability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Sep 8, 2024
1 parent fd8ef98 commit 799d00c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Monal/Classes/HelperTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void swizzle(Class c, SEL orig, SEL new);
+(NSString* _Nullable) exportIPCDatabase;
+(void) configureFileProtection:(NSString*) protectionLevel forFile:(NSString*) file;
+(void) configureFileProtectionFor:(NSString*) file;
+(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact;
+(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact NS_SWIFT_NAME(isContactBlacklistedForEncryption(_:));
+(void) removeAllShareInteractionsForAccountID:(NSNumber*) accountID;
+(NSDictionary<NSString*, NSString*>*) splitJid:(NSString*) jid;

Expand All @@ -160,7 +160,7 @@ void swizzle(Class c, SEL orig, SEL new);
+(NSString*) generateStringOfFeatureSet:(NSSet*) features;
+(NSSet*) getOwnFeatureSet;
+(NSString*) getEntityCapsHashForIdentities:(NSArray*) identities andFeatures:(NSSet*) features andForms:(NSArray*) forms;
+(NSString* _Nullable) formatLastInteraction:(NSDate*) lastInteraction;
+(NSString*) formatLastInteraction:(NSDate*) lastInteraction;
+(NSString*) stringFromTimeInterval:(NSUInteger) interval;
+(NSDate*) parseDateTimeString:(NSString*) datetime;
+(NSString*) generateDateTimeString:(NSDate*) datetime;
Expand Down
4 changes: 2 additions & 2 deletions Monal/Classes/HelperTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,7 @@ +(void) configureFileProtectionFor:(NSString*) file
+(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact
{
BOOL blacklisted = NO;
//cheogram.com does not support OMEMO encryption as it is a PSTN gateway
blacklisted = [@"cheogram.com" isEqualToString:[self splitJid:contact.contactJid][@"host"]];
if(blacklisted)
DDLogWarn(@"Jid blacklisted for encryption: %@", contact);
Expand Down Expand Up @@ -2248,9 +2249,8 @@ +(NSString*) generateStringOfCapsForms:(NSArray*) forms

/*
* create string containing the info when a user was seen the last time
* return nil if no timestamp was found in the db
*/
+(NSString* _Nullable) formatLastInteraction:(NSDate*) lastInteraction
+(NSString*) formatLastInteraction:(NSDate*) lastInteraction
{
// get current timestamp
unsigned long currentTimestamp = [HelperTools currentTimestampInSeconds].unsignedLongValue;
Expand Down

0 comments on commit 799d00c

Please sign in to comment.