2015-11-20 17:14:15 +00:00
|
|
|
/*
|
|
|
|
Copyright 2015 OpenMarket Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <MatrixKit/MatrixKit.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
'RecentsDataSource' class inherits from 'MXKInterleavedRecentsDataSource' to define Vector recents source.
|
|
|
|
*/
|
|
|
|
@interface RecentsDataSource : MXKInterleavedRecentsDataSource
|
|
|
|
|
2015-12-10 08:00:57 +00:00
|
|
|
/**
|
|
|
|
The callback when a room invitation is rejected.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, copy) void (^onRoomInvitationReject)(MXRoom*);
|
|
|
|
|
|
|
|
/**
|
|
|
|
The callback when a room invitation is accepted.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, copy) void (^onRoomInvitationAccept)(MXRoom*);
|
|
|
|
|
2015-12-11 13:59:55 +00:00
|
|
|
/**
|
|
|
|
There is a pending drag and drop cell.
|
2015-12-14 09:47:10 +00:00
|
|
|
It defines its path of the source cell.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, copy) NSIndexPath* hiddenCellIndexPath;
|
|
|
|
|
|
|
|
/**
|
|
|
|
There is a pending drag and drop cell.
|
|
|
|
It defines its path of the destination cell.
|
2015-12-11 13:59:55 +00:00
|
|
|
*/
|
2015-12-16 07:59:40 +00:00
|
|
|
@property (nonatomic, copy) NSIndexPath* droppingCellIndexPath;
|
2015-12-11 13:59:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
The movingCellBackgroundImage;
|
|
|
|
*/
|
2015-12-16 07:59:40 +00:00
|
|
|
@property (nonatomic) UIImageView* droppingCellBackGroundView;
|
2015-12-11 13:59:55 +00:00
|
|
|
|
2015-12-02 16:18:55 +00:00
|
|
|
/**
|
|
|
|
Return the header height from the section.
|
|
|
|
*/
|
|
|
|
- (CGFloat)heightForHeaderInSection:(NSInteger)section;
|
|
|
|
|
2015-12-11 10:50:13 +00:00
|
|
|
/**
|
|
|
|
Return true of the cell can be moved from a section to another one.
|
|
|
|
*/
|
|
|
|
- (BOOL)isDraggableCellAt:(NSIndexPath*)path;
|
|
|
|
|
2015-12-11 15:20:26 +00:00
|
|
|
/**
|
|
|
|
Return true of the cell can be moved from a section to another one.
|
|
|
|
*/
|
|
|
|
- (BOOL)canCellMoveFrom:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath;
|
|
|
|
|
2015-12-11 10:50:13 +00:00
|
|
|
/**
|
|
|
|
Move a cell from a path to another one.
|
|
|
|
It is based on room Tag.
|
|
|
|
*/
|
2015-12-15 07:34:46 +00:00
|
|
|
- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)())moveSuccess failure:(void (^)(NSError *error))moveFailure;
|
2015-12-11 10:50:13 +00:00
|
|
|
|
2015-11-20 17:14:15 +00:00
|
|
|
@end
|