room_photo_selection

Factorize the room notifications management.
This commit is contained in:
yannick
2015-12-16 10:47:15 +01:00
parent cdf8623b80
commit 7512760387
2 changed files with 24 additions and 3 deletions
+24
View File
@@ -22,6 +22,8 @@
#import "InviteRecentTableViewCell.h"
#import "MXRoom+Vector.h"
@interface RecentsDataSource()
{
NSMutableArray* invitesCellDataArray;
@@ -111,6 +113,28 @@
}
}
- (BOOL)isRoomNotifiedAtIndexPath:(NSIndexPath *)indexPath
{
MXRoom* room = [self getRoomAtIndexPath:indexPath];
if (room)
{
return !room.areRoomNotificationsMuted;
}
return YES;
}
- (void)muteRoomNotifications:(BOOL)mute atIndexPath:(NSIndexPath *)indexPath
{
MXRoom* room = [self getRoomAtIndexPath:indexPath];
// sanity check
if (room)
{
[room toggleRoomNotifications:mute];
}
}
- (void)didMXSessionInviteRoomUpdate:(NSNotification *)notif
{