Sending the file with it's actual fiename, changes temporary search bar stykle to match the real one's style, showing only joined rooms for sharing

This commit is contained in:
Aram Sargsyan 2017-08-21 18:45:16 +04:00
parent dd83fe957d
commit 5406fd3c9f
4 changed files with 8 additions and 6 deletions

View file

@ -380,7 +380,7 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
{ {
failureBlock(); failureBlock();
} }
}]; } keepActualFilename:YES];
} }
- (void)sendImage:(NSData *)imageData withProvider:(NSItemProvider*)itemProvider toRoom:(MXRoom *)room extensionItem:(NSExtensionItem *)extensionItem failureBlock:(void(^)())failureBlock - (void)sendImage:(NSData *)imageData withProvider:(NSItemProvider*)itemProvider toRoom:(MXRoom *)room extensionItem:(NSExtensionItem *)extensionItem failureBlock:(void(^)())failureBlock

View file

@ -59,14 +59,14 @@
if (self.dataSourceMode == RecentsDataSourceModePeople) if (self.dataSourceMode == RecentsDataSourceModePeople)
{ {
if (room.isDirect) if (room.isDirect && room.state.membership == MXMembershipJoin)
{ {
[self.recentPeople addObject:cellData]; [self.recentPeople addObject:cellData];
} }
} }
else if (self.dataSourceMode == RecentsDataSourceModeRooms) else if (self.dataSourceMode == RecentsDataSourceModeRooms)
{ {
if (!room.isDirect) if (!room.isDirect && room.state.membership == MXMembershipJoin)
{ {
[self.recentRooms addObject:cellData]; [self.recentRooms addObject:cellData];
} }

View file

@ -62,6 +62,7 @@
_tableSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 600, 44)]; _tableSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 600, 44)];
_tableSearchBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; _tableSearchBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_tableSearchBar.showsCancelButton = NO; _tableSearchBar.showsCancelButton = NO;
_tableSearchBar.searchBarStyle = UISearchBarStyleMinimal;
_tableSearchBar.placeholder = NSLocalizedStringFromTable(@"search_default_placeholder", @"Vector", nil); _tableSearchBar.placeholder = NSLocalizedStringFromTable(@"search_default_placeholder", @"Vector", nil);
_tableSearchBar.delegate = self; _tableSearchBar.delegate = self;
} }

View file

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait"> <device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/> <adaptation id="fullscreen"/>
</device> </device>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@ -23,7 +24,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<searchBar contentMode="redraw" showsCancelButton="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zbr-9e-VZh"> <searchBar contentMode="redraw" searchBarStyle="minimal" showsCancelButton="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zbr-9e-VZh">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="44" id="jCU-cq-2OA"/> <constraint firstAttribute="height" constant="44" id="jCU-cq-2OA"/>