Skip to content

Commit

Permalink
Revert "added functions to remove messages"
Browse files Browse the repository at this point in the history
This reverts commit 80147d4.
  • Loading branch information
Velin92 committed Jun 14, 2024
1 parent 80147d4 commit 55ec6f1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 97 deletions.
57 changes: 0 additions & 57 deletions Riot/Categories/MXRoomSummary.swift

This file was deleted.

15 changes: 0 additions & 15 deletions Riot/Categories/MXSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,3 @@ extension MXSession {
displayName: user?.displayname)
}
}

@objc extension MXSession {

/// Clean the storage of a session by removing the expired contents.
func removeExpiredMessages() {
var hasStoreChanged = false
for room in self.rooms {
hasStoreChanged = hasStoreChanged || room.summary.removeExpiredRoomContentsFromStore()
}

if hasStoreChanged {
self.store.commit?()
}
}
}
13 changes: 0 additions & 13 deletions Riot/Utils/Tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,4 @@
*/
+ (NSURL*)fixURLWithSeveralHashKeys:(NSURL*)url;

#pragma mark - Time utilities

/**
* Convert a number of days to a duration in ms.
*/
+ (uint64_t)durationInMsFromDays:(uint)days;

/**
* Convert a duration in ms to a number of days.
*/
+ (uint)numberOfDaysFromDurationInMs:(uint64_t)duration;


@end
12 changes: 0 additions & 12 deletions Riot/Utils/Tools.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,4 @@ + (NSURL *)fixURLWithSeveralHashKeys:(NSURL *)url
return fixedURL;
}

#pragma mark - Time utilities

+ (uint64_t)durationInMsFromDays:(uint)days
{
return days * (uint64_t)(86400000);
}

+ (uint)numberOfDaysFromDurationInMs:(uint64_t)duration
{
return (uint)(duration / 86400000);
}

@end

0 comments on commit 55ec6f1

Please sign in to comment.