mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Merge pull request #6565 from vector-im/ismail/5932_blank_room_screen
This commit is contained in:
commit
adfe56be8d
8 changed files with 52 additions and 54 deletions
|
@ -205,7 +205,7 @@ typedef enum : NSUInteger
|
|||
UIView *messageComposerContainer;
|
||||
|
||||
@protected
|
||||
UIView *inputAccessoryView;
|
||||
UIView *inputAccessoryViewForKeyboard;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -333,7 +333,7 @@ typedef enum : NSUInteger
|
|||
actually used to retrieve the keyboard view. Indeed the keyboard view is the superview of
|
||||
the accessory view when the message composer become the first responder.
|
||||
*/
|
||||
@property (readonly) UIView *inputAccessoryView;
|
||||
@property (readonly) UIView *inputAccessoryViewForKeyboard;
|
||||
|
||||
/**
|
||||
Display the keyboard.
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
@end
|
||||
|
||||
@implementation MXKRoomInputToolbarView
|
||||
@synthesize messageComposerContainer, inputAccessoryView;
|
||||
@synthesize messageComposerContainer, inputAccessoryViewForKeyboard;
|
||||
|
||||
+ (UINib *)nib
|
||||
{
|
||||
|
@ -103,7 +103,7 @@
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
inputAccessoryView = nil;
|
||||
inputAccessoryViewForKeyboard = nil;
|
||||
|
||||
[self destroy];
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
[super awakeFromNib];
|
||||
|
||||
// Add an accessory view to the text view in order to retrieve keyboard view.
|
||||
inputAccessoryView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
self.messageComposerTextView.inputAccessoryView = self.inputAccessoryView;
|
||||
inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
self.messageComposerTextView.inputAccessoryView = inputAccessoryViewForKeyboard;
|
||||
}
|
||||
|
||||
-(void)customizeViewRendering
|
||||
|
|
|
@ -308,7 +308,9 @@
|
|||
}
|
||||
|
||||
// Finalize view controller appearance
|
||||
[self updateViewControllerAppearanceOnRoomDataSourceState];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self updateViewControllerAppearanceOnRoomDataSourceState];
|
||||
});
|
||||
|
||||
// no need to reload the tableview at this stage
|
||||
// IOS is going to load it after calling this method
|
||||
|
@ -493,7 +495,7 @@
|
|||
if (!keyboardView)
|
||||
{
|
||||
// Check whether the first responder is the input tool bar text composer
|
||||
keyboardView = inputToolbarView.inputAccessoryView.superview;
|
||||
keyboardView = inputToolbarView.inputAccessoryViewForKeyboard.superview;
|
||||
}
|
||||
|
||||
// Report the keyboard view in order to track keyboard frame changes
|
||||
|
|
|
@ -353,7 +353,9 @@ static CGSize kThreadListBarButtonItemImageSize;
|
|||
|
||||
// Replace the default input toolbar view.
|
||||
// Note: this operation will force the layout of subviews. That is why cell view classes must be registered before.
|
||||
[self updateRoomInputToolbarViewClassIfNeeded];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self updateRoomInputToolbarViewClassIfNeeded];
|
||||
});
|
||||
|
||||
// set extra area
|
||||
[self setRoomActivitiesViewClass:RoomActivitiesView.class];
|
||||
|
@ -4938,7 +4940,9 @@ static CGSize kThreadListBarButtonItemImageSize;
|
|||
{
|
||||
readMarkerTableViewCell = roomBubbleTableViewCell;
|
||||
|
||||
[self checkReadMarkerVisibility];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self checkReadMarkerVisibility];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5678,25 +5682,28 @@ static CGSize kThreadListBarButtonItemImageSize;
|
|||
continueBlock(threadDataSource, YES);
|
||||
}];
|
||||
}
|
||||
else if (self.isContextPreview)
|
||||
else if (self.roomDataSource.roomId)
|
||||
{
|
||||
[RoomPreviewDataSource loadRoomDataSourceWithRoomId:self.roomDataSource.roomId
|
||||
andMatrixSession:self.mainSession
|
||||
onComplete:^(RoomPreviewDataSource *roomDataSource)
|
||||
{
|
||||
continueBlock(roomDataSource, YES);
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Switch back to the room live timeline managed by MXKRoomDataSourceManager
|
||||
MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession];
|
||||
if (self.isContextPreview)
|
||||
{
|
||||
[RoomPreviewDataSource loadRoomDataSourceWithRoomId:self.roomDataSource.roomId
|
||||
andMatrixSession:self.mainSession
|
||||
onComplete:^(RoomPreviewDataSource *roomDataSource)
|
||||
{
|
||||
continueBlock(roomDataSource, YES);
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Switch back to the room live timeline managed by MXKRoomDataSourceManager
|
||||
MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession];
|
||||
|
||||
[roomDataSourceManager roomDataSourceForRoom:self.roomDataSource.roomId
|
||||
create:YES
|
||||
onComplete:^(MXKRoomDataSource *roomDataSource) {
|
||||
continueBlock(roomDataSource, NO);
|
||||
}];
|
||||
[roomDataSourceManager roomDataSourceForRoom:self.roomDataSource.roomId
|
||||
create:YES
|
||||
onComplete:^(MXKRoomDataSource *roomDataSource) {
|
||||
continueBlock(roomDataSource, NO);
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
@ -41,25 +41,14 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="3z2-8P-wlg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="20.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hIS-uE-jlE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="20.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<variation key="default">
|
||||
<mask key="subviews">
|
||||
<exclude reference="hIS-uE-jlE"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="251" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="3z2-8P-wlg" userLabel="Top Banners Stack View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="0.0"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="250" id="Y9P-Ek-wjg"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<tableView contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" keyboardDismissMode="interactive" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="BGD-sd-SQR">
|
||||
<rect key="frame" x="0.0" y="20.5" width="375" height="605.5"/>
|
||||
<tableView contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="BGD-sd-SQR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="626"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityIdentifier" value="RoomVCBubblesTableView"/>
|
||||
|
@ -160,8 +149,8 @@
|
|||
<action selector="scrollToBottomAction:" destination="-1" eventType="touchUpInside" id="TOf-aY-J6a"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QHs-rM-UU8" userLabel="scroll badge" customClass="BadgeLabel" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="336.5" y="557.5" width="7.5" height="13.5"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QHs-rM-UU8" userLabel="scroll badge" customClass="BadgeLabel" customModule="Element" customModuleProvider="target">
|
||||
<rect key="frame" x="331.5" y="556" width="17.5" height="16.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -244,7 +233,7 @@
|
|||
</objects>
|
||||
<designables>
|
||||
<designable name="QHs-rM-UU8">
|
||||
<size key="intrinsicContentSize" width="7.5" height="13.5"/>
|
||||
<size key="intrinsicContentSize" width="17.5" height="16.5"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
|
|
|
@ -80,10 +80,9 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
|||
[self updateUIWithAttributedTextMessage:nil animated:NO];
|
||||
|
||||
self.textView.toolbarDelegate = self;
|
||||
|
||||
// Add an accessory view to the text view in order to retrieve keyboard view.
|
||||
inputAccessoryView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
self.textView.inputAccessoryView = inputAccessoryView;
|
||||
|
||||
inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
self.textView.inputAccessoryView = inputAccessoryViewForKeyboard;
|
||||
}
|
||||
|
||||
- (void)setVoiceMessageToolbarView:(UIView *)voiceMessageToolbarView
|
||||
|
|
1
changelog.d/5932.bugfix
Normal file
1
changelog.d/5932.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
RoomViewController: Wait for table view updates before checing read marker visibility.
|
Loading…
Reference in a new issue