mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 22:56:57 +02:00
Merge commit '80bda1906235b6007b98f18fb13681fff587f4a3' into feature/basis_update_192
# Conflicts: # Config/AppVersion.xcconfig # Config/BuildSettings.swift # DesignKit/Source/ColorsSwiftUI.swift # DesignKit/Source/FontsSwiftUI.swift # DesignKit/Source/ThemeV2.swift # DesignKit/Variants/Colors/Dark/DarkColors.swift # DesignKit/Variants/Colors/Light/LightColors.swift # Podfile.lock # Riot/Assets/de.lproj/InfoPlist.strings # Riot/Assets/de.lproj/Vector.strings # Riot/Assets/en.lproj/Vector.strings # Riot/Generated/Images.swift # Riot/Generated/Strings.swift # Riot/Managers/PushNotification/PushNotificationService.m # Riot/Managers/Settings/RiotSettings.swift # Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h # Riot/Modules/Common/Recents/RecentsViewController.m # Riot/Modules/Communities/Home/GroupHomeViewController.m # Riot/Modules/Room/RoomViewController.m # Riot/Modules/SetPinCode/PinCodePreferences.swift # Riot/Modules/Settings/SettingsViewController.m # Riot/Modules/TabBar/MasterTabBarController.h # Riot/Modules/TabBar/MasterTabBarController.m # Riot/Modules/TabBar/TabBarCoordinator.swift # fastlane/Fastfile # project.yml
This commit is contained in:
@@ -192,6 +192,7 @@ static NSAttributedString *verticalWhitespace = nil;
|
||||
NSString *claimedKey = _mxEvent.keysClaimed[@"ed25519"];
|
||||
NSString *algorithm = _mxEvent.wireContent[@"algorithm"];
|
||||
NSString *sessionId = _mxEvent.wireContent[@"session_id"];
|
||||
NSString *untrusted = _mxEvent.isUntrusted ? [VectorL10n userVerificationSessionsListSessionUntrusted] : [VectorL10n userVerificationSessionsListSessionTrusted];
|
||||
|
||||
NSString *decryptionError;
|
||||
if (_mxEvent.decryptionError)
|
||||
@@ -277,6 +278,16 @@ static NSAttributedString *verticalWhitespace = nil;
|
||||
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:14]}]];
|
||||
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
|
||||
|
||||
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:[NSString stringWithFormat:@"%@\n", [VectorL10n sslTrust]]
|
||||
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
|
||||
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
|
||||
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
|
||||
initWithString:untrusted
|
||||
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
|
||||
NSFontAttributeName: [UIFont systemFontOfSize:14]}]];
|
||||
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];
|
||||
|
||||
[textViewAttributedString appendAttributedString:eventInformationString];
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 Vector Creations 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 "MXKTableViewCell.h"
|
||||
|
||||
#import "MXKCellRendering.h"
|
||||
|
||||
#import "MXKGroupCellDataStoring.h"
|
||||
|
||||
/**
|
||||
`MXKGroupTableViewCell` instances display a group.
|
||||
*/
|
||||
@interface MXKGroupTableViewCell : MXKTableViewCell <MXKCellRendering>
|
||||
{
|
||||
@protected
|
||||
/**
|
||||
The current cell data displayed by the table view cell
|
||||
*/
|
||||
id<MXKGroupCellDataStoring> groupCellData;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *groupName;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *groupDescription;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *memberCount;
|
||||
|
||||
@end
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 Vector Creations 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 "MXKGroupTableViewCell.h"
|
||||
|
||||
#import "NSBundle+MatrixKit.h"
|
||||
|
||||
#import "MXKSwiftHeader.h"
|
||||
|
||||
@implementation MXKGroupTableViewCell
|
||||
@synthesize delegate;
|
||||
|
||||
#pragma mark - Class methods
|
||||
|
||||
- (void)render:(MXKCellData *)cellData
|
||||
{
|
||||
groupCellData = (id<MXKGroupCellDataStoring>)cellData;
|
||||
if (groupCellData)
|
||||
{
|
||||
// Render the current group values.
|
||||
_groupName.text = groupCellData.groupDisplayname;
|
||||
_groupDescription.text = groupCellData.group.profile.shortDescription;
|
||||
|
||||
if (_groupDescription.text.length)
|
||||
{
|
||||
_groupDescription.hidden = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Hide and fill the label with a fake description to harmonize the height of all the cells.
|
||||
// This is a drawback of the self-sizing cell.
|
||||
_groupDescription.hidden = YES;
|
||||
_groupDescription.text = @"No description";
|
||||
}
|
||||
|
||||
if (_memberCount)
|
||||
{
|
||||
if (groupCellData.group.summary.usersSection.totalUserCountEstimate > 1)
|
||||
{
|
||||
_memberCount.text = [VectorL10n numMembersOther:@(groupCellData.group.summary.usersSection.totalUserCountEstimate).stringValue];
|
||||
}
|
||||
else if (groupCellData.group.summary.usersSection.totalUserCountEstimate == 1)
|
||||
{
|
||||
_memberCount.text = [VectorL10n numMembersOne:@(1).stringValue];
|
||||
}
|
||||
else
|
||||
{
|
||||
_memberCount.text = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_groupName.text = nil;
|
||||
_groupDescription.text = nil;
|
||||
_memberCount.text = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (MXKCellData*)renderedCellData
|
||||
{
|
||||
return groupCellData;
|
||||
}
|
||||
|
||||
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
|
||||
{
|
||||
// The height is fixed
|
||||
//@TODO: change this to handle dynamic font
|
||||
return 70;
|
||||
}
|
||||
|
||||
- (void)prepareForReuse
|
||||
{
|
||||
[super prepareForReuse];
|
||||
|
||||
groupCellData = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="L2L-l5-wPx" customClass="MXKGroupTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="L2L-l5-wPx" id="aXz-IR-jj5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="69.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="RoomTitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Lg1-xQ-AGn">
|
||||
<rect key="frame" x="8" y="8" width="506" height="23"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="19"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LastEventDescription" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dQt-mN-T6b">
|
||||
<rect key="frame" x="8" y="42" width="584" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="xx users" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="360-Go-RcG">
|
||||
<rect key="frame" x="520" y="8" width="72" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="72" id="uOj-6w-G8q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leading" constant="8" id="3qc-BC-FYt"/>
|
||||
<constraint firstItem="360-Go-RcG" firstAttribute="leading" secondItem="Lg1-xQ-AGn" secondAttribute="trailing" constant="6" id="8ff-tS-Ulq"/>
|
||||
<constraint firstItem="dQt-mN-T6b" firstAttribute="leading" secondItem="aXz-IR-jj5" secondAttribute="leading" constant="8" id="UYQ-HG-YP1"/>
|
||||
<constraint firstItem="360-Go-RcG" firstAttribute="top" secondItem="aXz-IR-jj5" secondAttribute="top" constant="8" id="XyO-tl-6SX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="360-Go-RcG" secondAttribute="trailing" constant="8" id="YqC-WC-Wqe"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dQt-mN-T6b" secondAttribute="bottom" constant="9" id="sLb-Q4-AFW"/>
|
||||
<constraint firstItem="Lg1-xQ-AGn" firstAttribute="top" secondItem="aXz-IR-jj5" secondAttribute="top" constant="8" id="uCT-KE-X09"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dQt-mN-T6b" secondAttribute="trailing" constant="8" id="ygG-1B-fu3"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<connections>
|
||||
<outlet property="groupDescription" destination="dQt-mN-T6b" id="meF-te-1lf"/>
|
||||
<outlet property="groupName" destination="Lg1-xQ-AGn" id="ABQ-44-bUs"/>
|
||||
<outlet property="memberCount" destination="360-Go-RcG" id="oYv-dg-CoR"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -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];
|
||||
}
|
||||
@@ -1197,7 +1197,8 @@ NSString* MXKFileSizes_description(MXKFileSizes sizes)
|
||||
pasteboardImage = [UIImage imageWithData:[dict objectForKey:key]];
|
||||
}
|
||||
else {
|
||||
MXLogError(@"[MXKRoomInputToolbarView] Unsupported image format %@ for mimetype %@ pasted.", MIMEType, NSStringFromClass([[dict objectForKey:key] class]));
|
||||
NSString *message = [NSString stringWithFormat:@"[MXKRoomInputToolbarView] Unsupported image format %@ for mimetype %@ pasted.", MIMEType, NSStringFromClass([[dict objectForKey:key] class])];
|
||||
MXLogError(message);
|
||||
}
|
||||
|
||||
if (pasteboardImage)
|
||||
|
||||
+8
-3
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
#import "MXKRoomInputToolbarViewWithSimpleTextView.h"
|
||||
#import "ThemeService.h"
|
||||
#import "GeneratedInterface-Swift.h"
|
||||
|
||||
@implementation MXKRoomInputToolbarViewWithSimpleTextView
|
||||
|
||||
@@ -30,8 +32,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
|
||||
@@ -39,7 +41,10 @@
|
||||
[super customizeViewRendering];
|
||||
|
||||
// Set default message composer background color
|
||||
self.messageComposerTextView.backgroundColor = [UIColor whiteColor];
|
||||
self.messageComposerTextView.backgroundColor = ThemeService.shared.theme.backgroundColor;
|
||||
self.backgroundColor = ThemeService.shared.theme.colors.system;
|
||||
self.leftInputToolbarButton.tintColor = ThemeService.shared.theme.colors.accent;
|
||||
self.rightInputToolbarButton.tintColor = ThemeService.shared.theme.colors.accent;
|
||||
}
|
||||
|
||||
- (NSString*)textMessage
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *displayNameTextFieldTopConstraint;
|
||||
|
||||
@property (strong, nonatomic) MXRoom *mxRoom;
|
||||
@property (strong, nonatomic) MXUser *mxUser;
|
||||
@property (nonatomic) BOOL editable;
|
||||
@property (nonatomic) BOOL isEditing;
|
||||
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
// Replace empty string by nil : avoid having the placeholder 'Room name" when there is no displayname
|
||||
self.displayNameTextField.text = (_mxRoom.summary.displayname.length) ? _mxRoom.summary.displayname : nil;
|
||||
}
|
||||
else if (_mxUser)
|
||||
{
|
||||
self.displayNameTextField.text = (_mxUser.displayname.length) ? _mxUser.displayname : nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.displayNameTextField.text = [VectorL10n roomPleaseSelect];
|
||||
@@ -147,6 +151,16 @@
|
||||
[self refreshDisplay];
|
||||
}
|
||||
|
||||
- (void)setMxUser:(MXUser *)mxUser
|
||||
{
|
||||
_mxUser = mxUser;
|
||||
|
||||
if (mxUser) {
|
||||
// Force refresh
|
||||
[self refreshDisplay];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setEditable:(BOOL)editable
|
||||
{
|
||||
self.displayNameTextField.enabled = editable;
|
||||
|
||||
Reference in New Issue
Block a user