Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/release-v0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
giomfo committed Mar 7, 2016
2 parents fd98fe2 + 3b74534 commit f3eae71
Show file tree
Hide file tree
Showing 57 changed files with 1,373 additions and 959 deletions.
24 changes: 24 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Changes in MatrixKit in 0.3.3 (2016-03-07)
===============================================

Improvements:
* Upgrade MatrixSDK version (v0.6.3).
* MXKRoomDataSourceManager: Handle the current number of unread messages that match the push notification rules.
* MXKRoomDataSource: Remove the timestamp of unsent messages on data reload.
* MXKRoomViewController: Support the display of a timeline from the past.
* MXKRoomBubbleCellData: Improve the computation of the text components position.
* MXKViewControllerHandling: Define the default tint of the navigation bar.
* MXKViewControllerHandling: Add flag to disable navigation bar tint color change on network status change.
* MXKRoomBubbleTableViewCell: Add property to disable the default handling of the long press on event.
* MXKRoomMemberDetailsViewController has been refactored.
* MXKRoomInputToolbarView: Tells the delegate that the user is typing when textView did begin editing.
* MXKRoomInputToolbarView: Add option to enable media auto saving.
* MXKRoomViewController: Add missing constraint on Activities view.

Bug fixes:
* MXKEventFormater: Fixed crash ("NSConcreteMutableAttributedString add Attribute:value:range:: nil value") when trying to display bad formatted links.
* MXKRoomDataSource: At startup, recents are not updated for rooms with a gap during server sync.
* MXKAttachmentsViewController: Remove play icon on videos while they're playing.
* MXKRoomDataSource: A sent message may appear as unsent.
* MXKRoomViewController: Fixed jumps when going forwards. Backwards pagination should be smoother.

Changes in MatrixKit in 0.3.2 (2016-02-09)
===============================================

Expand Down
6 changes: 3 additions & 3 deletions MatrixKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MatrixKit"
s.version = "0.3.2"
s.version = "0.3.3"
s.summary = "The Matrix reusable UI library for iOS based on MatrixSDK."

s.description = <<-DESC
Expand All @@ -17,13 +17,13 @@ Pod::Spec.new do |s|

s.platform = :ios, "7.0"

s.source = { :git => "https://github.com/matrix-org/matrix-ios-kit.git", :tag => "v0.3.2" }
s.source = { :git => "https://github.com/matrix-org/matrix-ios-kit.git", :tag => "v0.3.3" }
s.source_files = "MatrixKit", "MatrixKit/**/*.{h,m}"
s.resources = "MatrixKit/**/*.{xib}", "MatrixKit/Assets/MatrixKitAssets.bundle"

s.requires_arc = true

s.dependency 'MatrixSDK', '~> 0.6.2'
s.dependency 'MatrixSDK', '~> 0.6.3'
s.dependency 'HPGrowingTextView', '~> 1.1'
s.dependency 'libPhoneNumber-iOS', '~> 0.8.7'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
"sign_up" = "Sign up";
"submit_code" = "Submit code";
"set_power_level" = "Set Power Level";
"set_default_power_level" = "Reset Power Level";
"set_moderator" = "Set Moderator";
"set_admin" = "Set Admin";
"start_chat" = "Start Chat";
"start_voice_call" = "Start Voice Call";
"start_video_call" = "Start Video Call";
Expand Down
3 changes: 3 additions & 0 deletions MatrixKit/Controllers/MXKAttachmentsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
{
[selectedCell.moviePlayer stop];
selectedCell.moviePlayer.view.hidden = YES;
selectedCell.centerIcon.hidden = NO;
}
else
{
Expand All @@ -671,6 +672,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
if ([[NSFileManager defaultManager] fileExistsAtPath:attachmentURL])
{
selectedCell.moviePlayer.view.hidden = NO;
selectedCell.centerIcon.hidden = YES;
selectedCell.moviePlayer.contentURL = [NSURL fileURLWithPath:attachmentURL];
[selectedCell.moviePlayer play];

Expand Down Expand Up @@ -716,6 +718,7 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
if (selectedCell.moviePlayer.view.superview)
{
selectedCell.moviePlayer.view.hidden = NO;
selectedCell.centerIcon.hidden = YES;
selectedCell.moviePlayer.contentURL = [NSURL fileURLWithPath:attachment.cacheFilePath];
[selectedCell.moviePlayer play];

Expand Down
74 changes: 52 additions & 22 deletions MatrixKit/Controllers/MXKRoomMemberDetailsViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,28 @@

#import <UIKit/UIKit.h>

#import "MXKTableViewController.h"
#import "MXKViewController.h"
#import "MXKImageView.h"

/**
Available actions on room member
*/
typedef NSString* MXKRoomMemberDetailsAction;
extern NSString *const MXKRoomMemberDetailsActionInvite;
extern NSString *const MXKRoomMemberDetailsActionLeave;
extern NSString *const MXKRoomMemberDetailsActionKick;
extern NSString *const MXKRoomMemberDetailsActionBan;
extern NSString *const MXKRoomMemberDetailsActionUnban;
extern NSString *const MXKRoomMemberDetailsActionSetPowerLevel;
extern NSString *const MXKRoomMemberDetailsActionStartChat;
extern NSString *const MXKRoomMemberDetailsActionStartVoiceCall;
extern NSString *const MXKRoomMemberDetailsActionStartVideoCall;
typedef enum : NSUInteger
{
MXKRoomMemberDetailsActionInvite,
MXKRoomMemberDetailsActionLeave,
MXKRoomMemberDetailsActionKick,
MXKRoomMemberDetailsActionBan,
MXKRoomMemberDetailsActionUnban,
MXKRoomMemberDetailsActionSetDefaultPowerLevel,
MXKRoomMemberDetailsActionSetModerator,
MXKRoomMemberDetailsActionSetAdmin,
MXKRoomMemberDetailsActionSetCustomPowerLevel,
MXKRoomMemberDetailsActionStartChat,
MXKRoomMemberDetailsActionStartVoiceCall,
MXKRoomMemberDetailsActionStartVideoCall

} MXKRoomMemberDetailsAction;

@class MXKRoomMemberDetailsViewController;

Expand Down Expand Up @@ -60,9 +67,23 @@ extern NSString *const MXKRoomMemberDetailsActionStartVideoCall;

@end

@interface MXKRoomMemberDetailsViewController : MXKTableViewController

@property (weak, nonatomic) IBOutlet UIButton *memberThumbnailButton;
/**
Whereas the main item of this view controller is a table view, the 'MXKRoomMemberDetailsViewController' class inherits
from 'MXKViewController' instead of 'MXKTableViewController' in order to ease the customization.
Indeed some items like header may be added at the same level than the table.
*/
@interface MXKRoomMemberDetailsViewController : MXKViewController <UITableViewDelegate, UITableViewDataSource>
{
@protected
/**
List of the allowed actions on this member.
*/
NSMutableArray<NSNumber*> *actionsArray;
}

@property (weak, nonatomic) IBOutlet UITableView *tableView;

@property (weak, nonatomic) IBOutlet MXKImageView *memberThumbnail;
@property (weak, nonatomic) IBOutlet UITextView *roomMemberMatrixInfo;

/**
Expand All @@ -81,6 +102,11 @@ extern NSString *const MXKRoomMemberDetailsActionStartVideoCall;
*/
@property (nonatomic) BOOL enableVoipCall;

/**
Tell whether an action is already in progress.
*/
@property (nonatomic, readonly) BOOL hasPendingAction;

/**
The delegate for the view controller.
*/
Expand Down Expand Up @@ -117,23 +143,27 @@ extern NSString *const MXKRoomMemberDetailsActionStartVideoCall;
- (void)displayRoomMember:(MXRoomMember*)roomMember withMatrixRoom:(MXRoom*)room;

/**
The member's thumbnail is displayed inside a button. The following method is registered on
`UIControlEventTouchUpInside` event of this button.
Nothing is done by the current implementation.
Refresh the member information.
*/
- (IBAction)onMemberThumbnailPressed:(id)sender;
- (void)updateMemberInfo;

/**
The following method is registered on `UIControlEventTouchUpInside` event for all displayed action buttons (see MXKRoomMemberDetailsAction).
The following method is registered on `UIControlEventTouchUpInside` event for all displayed action buttons.
The start chat option ('MXKRoomMemberDetailsActionStartChat') is transferred to the delegate.
The start chat option is transferred to the delegate.
All the other actions are handled by the current implementation.
If the delegate responds to selector: @selector(roomMemberDetailsViewController:placeVoipCallWithMemberId:andVideo:), the voip options
('MXKRoomMemberDetailsActionStartVoiceCall' and 'MXKRoomMemberDetailsActionStartVideoCall') are transferred to the delegate.
are transferred to the delegate.
*/
- (IBAction)onActionButtonPressed:(id)sender;

/**
Set the power level of the room member
@param value the value to set.
*/
- (void)setPowerLevel:(NSUInteger)value;

@end

Loading

0 comments on commit f3eae71

Please sign in to comment.