Merge remote-tracking branch 'origin/develop' into search_api_support
Conflicts: Vector/Base.lproj/Main.storyboard Vector/ViewController/RecentsViewController.m
|
Before Width: | Height: | Size: 473 B |
|
Before Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 927 B |
|
Before Width: | Height: | Size: 999 B |
|
Before Width: | Height: | Size: 964 B |
|
Before Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1011 B |
|
Before Width: | Height: | Size: 331 B |
|
After Width: | Height: | Size: 656 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1011 B |
|
Before Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 625 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 838 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 419 B |
|
After Width: | Height: | Size: 575 B |
|
Before Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 854 B |
|
After Width: | Height: | Size: 292 B |
|
After Width: | Height: | Size: 644 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 903 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 724 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 900 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1003 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 834 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 306 B |
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 1021 B |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -72,10 +72,6 @@
|
||||
"room_participants_invite_another_user" = "Invite another user";
|
||||
|
||||
// Chat
|
||||
"room_option_start_group_voice" = "Start group audio chat";
|
||||
"room_option_start_group_video" = "Start group video chat";
|
||||
"room_option_share_location" = "Share location";
|
||||
"room_option_share_contact" = "Share contact";
|
||||
"room_one_user_is_typing" = "%@ is typing...";
|
||||
"room_two_users_are_typing" = "%@ & %@ are typing...";
|
||||
"room_many_users_are_typing" = "%@, %@ & others are typing...";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="H1p-Uh-vWS">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="H1p-Uh-vWS">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--RecentsNav-->
|
||||
@@ -205,7 +205,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="6sO-OP-7Sv">
|
||||
<barButtonItem key="leftBarButtonItem" image="settings.png" id="9PU-2Y-yGq">
|
||||
<barButtonItem key="leftBarButtonItem" image="settings_icon.png" id="9PU-2Y-yGq">
|
||||
<connections>
|
||||
<segue destination="1TJ-Md-cjN" kind="show" identifier="showSettings" id="wd0-0d-DFM"/>
|
||||
</connections>
|
||||
@@ -277,10 +277,10 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="settings.png" width="16" height="16"/>
|
||||
<image name="settings_icon.png" width="22" height="22"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="vqM-5M-ctF"/>
|
||||
<segue reference="Vo4-8x-dtH"/>
|
||||
<segue reference="vqM-5M-ctF"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
</document>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
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>
|
||||
|
||||
@interface Contact : MXKContact
|
||||
|
||||
@property (nonatomic) MXRoomMember* mxMember;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
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 "Contact.h"
|
||||
|
||||
#import "AvatarGenerator.h"
|
||||
|
||||
@implementation Contact
|
||||
|
||||
- (UIImage*)thumbnailWithPreferedSize:(CGSize)size
|
||||
{
|
||||
UIImage* thumbnail = nil;
|
||||
|
||||
// replace the identicon icon by the Vector style one
|
||||
if (_mxMember && ([_mxMember.avatarUrl rangeOfString:@"identicon"].location != NSNotFound))
|
||||
{
|
||||
thumbnail = [AvatarGenerator generateRoomMemberAvatar:_mxMember.userId displayName:_mxMember.displayname];
|
||||
}
|
||||
else
|
||||
{
|
||||
thumbnail = [super thumbnailWithPreferedSize:size];
|
||||
}
|
||||
|
||||
// ensure that the thumbnail will have a vector style.
|
||||
if (!thumbnail)
|
||||
{
|
||||
thumbnail = [AvatarGenerator generateAvatarForText:self.displayName];
|
||||
}
|
||||
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -18,10 +18,25 @@
|
||||
|
||||
#import "EventFormatter.h"
|
||||
|
||||
#import "AvatarGenerator.h"
|
||||
|
||||
@implementation RoomBubbleCellData
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (instancetype)initWithEvent:(MXEvent *)event andRoomState:(MXRoomState *)roomState andRoomDataSource:(MXKRoomDataSource *)roomDataSource2
|
||||
{
|
||||
self = [super initWithEvent:event andRoomState:roomState andRoomDataSource:roomDataSource2];
|
||||
|
||||
if (self)
|
||||
{
|
||||
// use the matrix style placeholder
|
||||
self.senderAvatarPlaceholder = [AvatarGenerator generateRoomMemberAvatar:self.senderId displayName:self.senderDisplayName];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSAttributedString*)attributedTextMessage
|
||||
{
|
||||
if (!attributedTextMessage.length && bubbleComponents.count)
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#import "EventFormatter.h"
|
||||
|
||||
#import "VectorDesignValues.h"
|
||||
|
||||
@interface RecentsDataSource()
|
||||
{
|
||||
NSMutableArray* favoriteCellDataArray;
|
||||
@@ -116,7 +118,7 @@
|
||||
{
|
||||
if ((section == favoritesSection) || (section == conversationSection) || (section == lowPrioritySection))
|
||||
{
|
||||
return 44.0f;
|
||||
return 30.0f;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
@@ -177,7 +179,8 @@
|
||||
}
|
||||
|
||||
label.text = [NSString stringWithFormat:@" %@", text];
|
||||
label.backgroundColor = [UIColor lightGrayColor];
|
||||
label.font = [UIFont boldSystemFontOfSize:15.0];
|
||||
label.backgroundColor = VECTOR_LIGHT_GRAY_COLOR;
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
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>
|
||||
|
||||
/**
|
||||
`AvatarGenerator` class generate an avatar image from objects
|
||||
*/
|
||||
@interface AvatarGenerator : NSObject
|
||||
|
||||
/**
|
||||
Generate an avatar for a room.
|
||||
@param room the room
|
||||
@return the avatar image
|
||||
*/
|
||||
+ (UIImage*)generateRoomAvatar:(MXRoom*)room;
|
||||
|
||||
/**
|
||||
Generate an avatar for a room member.
|
||||
@param userId the member userId
|
||||
@param displayname the member displayname
|
||||
@return the avatar image
|
||||
*/
|
||||
+ (UIImage*)generateRoomMemberAvatar:(NSString*)userId displayName:(NSString*)displayname;
|
||||
|
||||
/**
|
||||
Generate an avatar for a text.
|
||||
@param text the text.
|
||||
@return the avatar image
|
||||
*/
|
||||
+ (UIImage*)generateAvatarForText:(NSString*)text;
|
||||
|
||||
@end
|
||||