mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge branch 'develop' into element_3579
This commit is contained in:
commit
b9c2f1a02c
17 changed files with 349 additions and 29 deletions
27
CHANGES.rst
27
CHANGES.rst
|
@ -22,6 +22,33 @@ Changes to be released in next version
|
|||
Others
|
||||
*
|
||||
|
||||
Changes in 1.1.1 (2020-11-24)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
* Home: Add empty screen when there is nothing to display (#3823).
|
||||
|
||||
🐛 Bugfix
|
||||
*
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.13.1](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.13.1)).
|
||||
|
||||
Changes in 1.1.0 (2020-11-17)
|
||||
=================================================
|
||||
|
||||
|
|
2
Podfile
2
Podfile
|
@ -11,7 +11,7 @@ use_frameworks!
|
|||
# - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each repo. Used by Fastfile during CI
|
||||
#
|
||||
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
|
||||
$matrixKitVersion = '= 0.13.0'
|
||||
$matrixKitVersion = '= 0.13.1'
|
||||
# $matrixKitVersion = :local
|
||||
# $matrixKitVersion = {'develop' => 'develop'}
|
||||
|
||||
|
|
34
Podfile.lock
34
Podfile.lock
|
@ -60,38 +60,38 @@ PODS:
|
|||
- MatomoTracker (7.2.2):
|
||||
- MatomoTracker/Core (= 7.2.2)
|
||||
- MatomoTracker/Core (7.2.2)
|
||||
- MatrixKit (0.13.0):
|
||||
- MatrixKit (0.13.1):
|
||||
- Down (~> 0.9.3)
|
||||
- DTCoreText (~> 1.6.23)
|
||||
- HPGrowingTextView (~> 1.1)
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatrixKit/Core (= 0.13.0)
|
||||
- MatrixSDK (= 0.17.2)
|
||||
- MatrixKit/AppExtension (0.13.0):
|
||||
- MatrixKit/Core (= 0.13.1)
|
||||
- MatrixSDK (= 0.17.3)
|
||||
- MatrixKit/AppExtension (0.13.1):
|
||||
- Down (~> 0.9.3)
|
||||
- DTCoreText (~> 1.6.23)
|
||||
- DTCoreText/Extension
|
||||
- HPGrowingTextView (~> 1.1)
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatrixSDK (= 0.17.2)
|
||||
- MatrixKit/Core (0.13.0):
|
||||
- MatrixSDK (= 0.17.3)
|
||||
- MatrixKit/Core (0.13.1):
|
||||
- Down (~> 0.9.3)
|
||||
- DTCoreText (~> 1.6.23)
|
||||
- HPGrowingTextView (~> 1.1)
|
||||
- libPhoneNumber-iOS (~> 0.9.13)
|
||||
- MatrixSDK (= 0.17.2)
|
||||
- MatrixSDK (0.17.2):
|
||||
- MatrixSDK/Core (= 0.17.2)
|
||||
- MatrixSDK/Core (0.17.2):
|
||||
- MatrixSDK (= 0.17.3)
|
||||
- MatrixSDK (0.17.3):
|
||||
- MatrixSDK/Core (= 0.17.3)
|
||||
- MatrixSDK/Core (0.17.3):
|
||||
- AFNetworking (~> 4.0.0)
|
||||
- GZIP (~> 1.3.0)
|
||||
- libbase58 (~> 0.1.4)
|
||||
- OLMKit (~> 3.1.0)
|
||||
- Realm (= 10.1.2)
|
||||
- MatrixSDK/JingleCallStack (0.17.2):
|
||||
- MatrixSDK/JingleCallStack (0.17.3):
|
||||
- JitsiMeetSDK (= 2.10.2)
|
||||
- MatrixSDK/Core
|
||||
- MatrixSDK/SwiftSupport (0.17.2):
|
||||
- MatrixSDK/SwiftSupport (0.17.3):
|
||||
- MatrixSDK/Core
|
||||
- OLMKit (3.1.0):
|
||||
- OLMKit/olmc (= 3.1.0)
|
||||
|
@ -129,8 +129,8 @@ DEPENDENCIES:
|
|||
- KeychainAccess (~> 4.2.1)
|
||||
- KTCenterFlowLayout (~> 1.3.1)
|
||||
- MatomoTracker (~> 7.2.2)
|
||||
- MatrixKit (= 0.13.0)
|
||||
- MatrixKit/AppExtension (= 0.13.0)
|
||||
- MatrixKit (= 0.13.1)
|
||||
- MatrixKit/AppExtension (= 0.13.1)
|
||||
- MatrixSDK
|
||||
- MatrixSDK/JingleCallStack
|
||||
- MatrixSDK/SwiftSupport
|
||||
|
@ -202,8 +202,8 @@ SPEC CHECKSUMS:
|
|||
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
|
||||
Logging: beeb016c9c80cf77042d62e83495816847ef108b
|
||||
MatomoTracker: a59ec4da0f580be57bdc6baa708a71a86532a832
|
||||
MatrixKit: dcdba5e31ef1c01515e052ed5f6f4fce89fc2042
|
||||
MatrixSDK: 8a3a9019bdda16f39c75dc59e2237a93c6623de4
|
||||
MatrixKit: 47bc0d4414761f5a88fc1e6429cb0d8ab4d10b2f
|
||||
MatrixSDK: 673536e6b013185ce149ba61ff24b84becab40fd
|
||||
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
|
||||
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
|
||||
Realm: 031fdd4be7094d01b43af1a5e49766ab644bb800
|
||||
|
@ -215,6 +215,6 @@ SPEC CHECKSUMS:
|
|||
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
|
||||
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
|
||||
|
||||
PODFILE CHECKSUM: 01dbc960d5abbec2af0f7d23ef0c33da02c75b30
|
||||
PODFILE CHECKSUM: 1f3cfce328f9e786da7240ccb9391754c65531eb
|
||||
|
||||
COCOAPODS: 1.10.0
|
||||
|
|
|
@ -203,6 +203,8 @@
|
|||
B110872621F098F0003554A5 /* ActivityIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B110872221F098F0003554A5 /* ActivityIndicatorView.swift */; };
|
||||
B11291EA238D35590077B478 /* SlidingModalPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11291E9238D35590077B478 /* SlidingModalPresentable.swift */; };
|
||||
B11291EC238D704C0077B478 /* FloatingPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11291EB238D704C0077B478 /* FloatingPoint.swift */; };
|
||||
B11F4D1C25680010009F1586 /* HomeEmptyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B11F4D1A25680010009F1586 /* HomeEmptyView.xib */; };
|
||||
B11F4D1D25680010009F1586 /* HomeEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B11F4D1B25680010009F1586 /* HomeEmptyView.swift */; };
|
||||
B120863722EF375F001F89E0 /* ReactionHistoryBridgeCoordinatorPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B120863622EF375F001F89E0 /* ReactionHistoryBridgeCoordinatorPresenter.swift */; };
|
||||
B125FE1B231D5BF200B72806 /* SettingsDiscoveryTableViewSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B125FE1A231D5BF200B72806 /* SettingsDiscoveryTableViewSection.swift */; };
|
||||
B125FE1D231D5DE400B72806 /* SettingsDiscoveryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B125FE1C231D5DE400B72806 /* SettingsDiscoveryViewModel.swift */; };
|
||||
|
@ -1239,6 +1241,8 @@
|
|||
B110872221F098F0003554A5 /* ActivityIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityIndicatorView.swift; sourceTree = "<group>"; };
|
||||
B11291E9238D35590077B478 /* SlidingModalPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlidingModalPresentable.swift; sourceTree = "<group>"; };
|
||||
B11291EB238D704C0077B478 /* FloatingPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingPoint.swift; sourceTree = "<group>"; };
|
||||
B11F4D1A25680010009F1586 /* HomeEmptyView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeEmptyView.xib; sourceTree = "<group>"; };
|
||||
B11F4D1B25680010009F1586 /* HomeEmptyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeEmptyView.swift; sourceTree = "<group>"; };
|
||||
B120863622EF375F001F89E0 /* ReactionHistoryBridgeCoordinatorPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionHistoryBridgeCoordinatorPresenter.swift; sourceTree = "<group>"; };
|
||||
B125FE1A231D5BF200B72806 /* SettingsDiscoveryTableViewSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDiscoveryTableViewSection.swift; sourceTree = "<group>"; };
|
||||
B125FE1C231D5DE400B72806 /* SettingsDiscoveryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDiscoveryViewModel.swift; sourceTree = "<group>"; };
|
||||
|
@ -4454,6 +4458,8 @@
|
|||
B1B5594320EF7BD000210D55 /* TableViewCellWithCollectionView.h */,
|
||||
B1B5594020EF7BD000210D55 /* TableViewCellWithCollectionView.m */,
|
||||
B1B5593F20EF7BD000210D55 /* TableViewCellWithCollectionView.xib */,
|
||||
B11F4D1B25680010009F1586 /* HomeEmptyView.swift */,
|
||||
B11F4D1A25680010009F1586 /* HomeEmptyView.xib */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
|
@ -5931,6 +5937,7 @@
|
|||
B1B5582B20EF666100210D55 /* DirectoryRecentTableViewCell.xib in Resources */,
|
||||
B105778F2213052A00334B1E /* KeyBackupSetupSuccessFromRecoveryKeyViewController.storyboard in Resources */,
|
||||
EC1CA89924C9C9A200DE9EBF /* SetupBiometricsViewController.storyboard in Resources */,
|
||||
B11F4D1C25680010009F1586 /* HomeEmptyView.xib in Resources */,
|
||||
B1B5590F20EF782800210D55 /* TableViewCellWithPhoneNumberTextField.xib in Resources */,
|
||||
B1B5578520EF564900210D55 /* GroupTableViewCellWithSwitch.xib in Resources */,
|
||||
B1B557B320EF5AEF00210D55 /* EventDetailsView.xib in Resources */,
|
||||
|
@ -6914,6 +6921,7 @@
|
|||
B10A3E9C24FE88CB007C380F /* RootRouter.swift in Sources */,
|
||||
B1C562E8228C7CF20037F12A /* ContextualMenuItemView.swift in Sources */,
|
||||
B14F143022144F6500FA0595 /* KeyBackupRecoverFromRecoveryKeyCoordinatorType.swift in Sources */,
|
||||
B11F4D1D25680010009F1586 /* HomeEmptyView.swift in Sources */,
|
||||
B1E5368921FB1E20001F3AFF /* UIButton.swift in Sources */,
|
||||
B1DCC63422E72C1B00625807 /* UISearchBar.swift in Sources */,
|
||||
32A6001622C661100042C1D9 /* EditHistoryViewState.swift in Sources */,
|
||||
|
@ -7331,7 +7339,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1;
|
||||
CURRENT_PROJECT_VERSION = 1.1.2;
|
||||
DEFINES_MODULE = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
@ -7351,7 +7359,7 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
MARKETING_VERSION = 1.1.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
@ -7390,7 +7398,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 1.1.1;
|
||||
CURRENT_PROJECT_VERSION = 1.1.2;
|
||||
DEFINES_MODULE = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -7403,7 +7411,7 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = 1.1.1;
|
||||
MARKETING_VERSION = 1.1.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
23
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/Contents.json
vendored
Normal file
23
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "home_placeholder_artwork.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_placeholder_artwork@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_placeholder_artwork@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork@2x.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork@3x.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Home/home_placeholder_artwork.imageset/home_placeholder_artwork@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
|
@ -1516,3 +1516,8 @@
|
|||
"room_info_list_one_member" = "1 member";
|
||||
"room_info_list_several_members" = "%@ members";
|
||||
"room_info_list_section_other" = "Other";
|
||||
|
||||
// MARK: - Home
|
||||
|
||||
"home_empty_view_title" = "Welcome to Element,\n%@";
|
||||
"home_empty_view_information" = "The all-in-one secure chat app for teams, friends and organisations. Tap the \"+\" button below to add people and rooms.";
|
||||
|
|
|
@ -900,7 +900,7 @@
|
|||
"widget_picker_title" = "Integrime";
|
||||
"service_terms_modal_decline_button" = "Hidhe poshtë";
|
||||
"service_terms_modal_description_for_identity_server_1" = "Gjeni të tjerë përmes telefoni ose email-i";
|
||||
"service_terms_modal_description_for_identity_server_2" = "Bëhuni i gjetshëm përmes telefoni ose email-i";
|
||||
"service_terms_modal_description_for_identity_server_2" = "Bëhuni i gjetshëm përmes telefoni ose email-i";
|
||||
// Service terms - Variant for identity server when displayed out of a context
|
||||
"service_terms_modal_title_identity_server" = "Zbulim kontaktesh";
|
||||
"service_terms_modal_message_identity_server" = "Që të zbuloni kontakte, pranoni kushtet e shërbyesit të identiteteve (%@).";
|
||||
|
@ -1058,7 +1058,7 @@
|
|||
"key_verification_self_verify_unverified_sessions_alert_message" = "Verifikoni krejt sesionet tuaj që të siguroheni se llogaria & mesazhet tuaja janë të sigurt.";
|
||||
"key_verification_self_verify_unverified_sessions_alert_validate_action" = "Shqyrtojeni";
|
||||
"device_verification_self_verify_wait_new_sign_in_title" = "Verifikoni këto kredenciale hyrjeje";
|
||||
"device_verification_self_verify_wait_additional_information" = "ose një tjetër klient Matrix i aftë për <em>cross-signing</em";
|
||||
"device_verification_self_verify_wait_additional_information" = "Kjo funksionon më Element-in ose një tjetër klient Matrix i aftë për <em>cross-signing</em.";
|
||||
"key_verification_verify_sas_title_emoji" = "Krahasoni emoji";
|
||||
"key_verification_verify_sas_title_number" = "Krahasoni numra";
|
||||
"key_verification_verify_sas_cancel_action" = "S’përputhen";
|
||||
|
@ -1113,7 +1113,7 @@
|
|||
"secure_key_backup_setup_intro_title" = "Kopjeruajtje e Sigurt";
|
||||
"secure_key_backup_setup_intro_info" = "Mbrohuni kundër humbjes së hyrjes në mesazhe & të dhëna të fshehtëzuara, duke kopjeruajtur kyçe fshehtëzimi në shërbyesin tuaj.";
|
||||
"secure_key_backup_setup_intro_use_security_key_title" = "Përdorni një Kyç Sigurie";
|
||||
"secure_key_backup_setup_intro_use_security_key_info" = "Prodhoni një kyç sigurie për ta ruajtur diku të parrezik, bie fjala, në një përgjegjës fjalëkalimesh apo në një kasafortë.";
|
||||
"secure_key_backup_setup_intro_use_security_key_info" = "Prodhoni një kyç sigurie për ta ruajtur diku të parrezik, bie fjala, në një përgjegjës fjalëkalimesh apo në një kasafortë.";
|
||||
"secure_key_backup_setup_intro_use_security_passphrase_title" = "Përdorni një Frazëkalim Sigurie";
|
||||
"secure_key_backup_setup_intro_use_security_passphrase_info" = "Jepni një frazë të fshehtë që e dini vetëm ju, dhe prodhoni një kyç për kopjeruajtje.";
|
||||
"secure_key_backup_setup_cancel_alert_title" = "Jeni i sigurt?";
|
||||
|
@ -1250,3 +1250,5 @@
|
|||
"secrets_recovery_reset_action_part_1" = "Harruat ose humbët krejt mundësitë e rimarrjes? ";
|
||||
"less" = "Më pak";
|
||||
"secrets_recovery_reset_action_part_2" = "Riktheni gjithçka te parazgjedhjet";
|
||||
"secrets_setup_recovery_passphrase_summary_information" = "Mbani mend Frazën tuaj të Sigurisë. Mund të përdoret për të shkyçur mesazhet & të dhëna tuajat të fshehtëzuara.";
|
||||
"secrets_setup_recovery_passphrase_summary_title" = "Ruani Frazën tuaj të Sigurisë";
|
||||
|
|
|
@ -65,6 +65,7 @@ internal enum Asset {
|
|||
internal static let roomActionNotification = ImageAsset(name: "room_action_notification")
|
||||
internal static let roomActionPriorityHigh = ImageAsset(name: "room_action_priority_high")
|
||||
internal static let roomActionPriorityLow = ImageAsset(name: "room_action_priority_low")
|
||||
internal static let homePlaceholderArtwork = ImageAsset(name: "home_placeholder_artwork")
|
||||
internal static let plusFloatingAction = ImageAsset(name: "plus_floating_action")
|
||||
internal static let closeBanner = ImageAsset(name: "close_banner")
|
||||
internal static let importFilesButton = ImageAsset(name: "import_files_button")
|
||||
|
|
|
@ -1346,6 +1346,14 @@ internal enum VectorL10n {
|
|||
internal static var groupSection: String {
|
||||
return VectorL10n.tr("Vector", "group_section")
|
||||
}
|
||||
/// The all-in-one secure chat app for teams, friends and organisations. Tap the "+" button below to add people and rooms.
|
||||
internal static var homeEmptyViewInformation: String {
|
||||
return VectorL10n.tr("Vector", "home_empty_view_information")
|
||||
}
|
||||
/// Welcome to Element,\n%@
|
||||
internal static func homeEmptyViewTitle(_ p1: String) -> String {
|
||||
return VectorL10n.tr("Vector", "home_empty_view_title", p1)
|
||||
}
|
||||
/// Could not connect to the homeserver.
|
||||
internal static var homeserverConnectionLost: String {
|
||||
return VectorL10n.tr("Vector", "homeserver_connection_lost")
|
||||
|
|
|
@ -118,6 +118,8 @@
|
|||
*/
|
||||
- (void)cancelEditionMode:(BOOL)forceRefresh;
|
||||
|
||||
- (void)userInterfaceThemeDidChange;
|
||||
|
||||
#pragma mark - Room handling
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
@property (nonatomic, strong) CrossSigningSetupBannerCell *keyVerificationSetupBannerPrototypeCell;
|
||||
@property (nonatomic, strong) AuthenticatedSessionViewControllerFactory *authenticatedSessionViewControllerFactory;
|
||||
|
||||
@property (nonatomic, weak) HomeEmptyView *homeEmptyView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HomeViewController
|
||||
|
@ -100,6 +102,8 @@
|
|||
recentsDataSource.areSectionsShrinkable = NO;
|
||||
[recentsDataSource setDelegate:self andRecentsDataSourceMode:RecentsDataSourceModeHome];
|
||||
}
|
||||
|
||||
[self updateEmptyViewDisplayName];
|
||||
|
||||
[self moveAllCollectionsToLeft];
|
||||
}
|
||||
|
@ -273,12 +277,32 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)onMatrixSessionChange
|
||||
{
|
||||
[super onMatrixSessionChange];
|
||||
|
||||
[self updateEmptyViewDisplayName];
|
||||
}
|
||||
|
||||
- (void)userInterfaceThemeDidChange
|
||||
{
|
||||
[super userInterfaceThemeDidChange];
|
||||
|
||||
[self.homeEmptyView updateWithTheme:ThemeService.shared.theme];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
NSInteger numberOfSections = [recentsDataSource numberOfSectionsInTableView:tableView];
|
||||
|
||||
BOOL showEmptyView = [self shouldShowEmptyView];
|
||||
|
||||
[self showEmptyView:showEmptyView];
|
||||
|
||||
// Return the actual number of sections prepared in recents dataSource.
|
||||
return [recentsDataSource numberOfSectionsInTableView:tableView];
|
||||
return numberOfSections;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
|
@ -793,4 +817,72 @@
|
|||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Empty view management
|
||||
|
||||
- (void)showEmptyView:(BOOL)show
|
||||
{
|
||||
if (show && !self.homeEmptyView)
|
||||
{
|
||||
HomeEmptyView *homeEmptyView = [HomeEmptyView instantiate];
|
||||
[homeEmptyView updateWithTheme:ThemeService.shared.theme];
|
||||
[self addEmptyView:homeEmptyView];
|
||||
|
||||
self.homeEmptyView = homeEmptyView;
|
||||
|
||||
[self updateEmptyViewDisplayName];
|
||||
}
|
||||
else if (!show)
|
||||
{
|
||||
[self.homeEmptyView removeFromSuperview];
|
||||
}
|
||||
|
||||
self.recentsTableView.hidden = show;
|
||||
}
|
||||
|
||||
- (void)updateEmptyViewDisplayName
|
||||
{
|
||||
MXUser *myUser = self.mainSession.myUser;
|
||||
NSString *displayName = myUser.displayname ?: myUser.userId;
|
||||
|
||||
[self.homeEmptyView fillWith:displayName ?: @""];
|
||||
}
|
||||
|
||||
- (void)addEmptyView:(UIView*)emptyView
|
||||
{
|
||||
[self.view insertSubview:emptyView belowSubview:plusButtonImageView];
|
||||
|
||||
emptyView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[emptyView.topAnchor constraintEqualToAnchor:emptyView.superview.topAnchor],
|
||||
[emptyView.leftAnchor constraintEqualToAnchor:emptyView.superview.leftAnchor],
|
||||
[emptyView.rightAnchor constraintEqualToAnchor:emptyView.superview.rightAnchor],
|
||||
[emptyView.bottomAnchor constraintEqualToAnchor:plusButtonImageView.topAnchor]
|
||||
]];
|
||||
}
|
||||
|
||||
// By default on fresh account
|
||||
- (BOOL)shouldShowEmptyView
|
||||
{
|
||||
// Check if some banners should be displayed
|
||||
if (recentsDataSource.secureBackupBannerSection != -1 || recentsDataSource.crossSigningBannerSection != -1)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Otherwise check the number of items to display
|
||||
return [self totalItemCounts] == 0;
|
||||
}
|
||||
|
||||
// Total items to display on the screen
|
||||
- (NSUInteger)totalItemCounts
|
||||
{
|
||||
return recentsDataSource.invitesCellDataArray.count
|
||||
+ recentsDataSource.favoriteCellDataArray.count
|
||||
+ recentsDataSource.peopleCellDataArray.count
|
||||
+ recentsDataSource.conversationCellDataArray.count
|
||||
+ recentsDataSource.lowPriorityCellDataArray.count
|
||||
+ recentsDataSource.serverNoticeCellDataArray.count;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
70
Riot/Modules/Home/Views/HomeEmptyView.swift
Normal file
70
Riot/Modules/Home/Views/HomeEmptyView.swift
Normal file
|
@ -0,0 +1,70 @@
|
|||
//
|
||||
// Copyright 2020 New Vector 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 Foundation
|
||||
import Reusable
|
||||
|
||||
@objcMembers
|
||||
final class HomeEmptyView: UIView, NibLoadable {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Outlets
|
||||
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet private weak var informationLabel: UILabel!
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private var theme: Theme!
|
||||
|
||||
// MARK: Public
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
class func instantiate() -> HomeEmptyView {
|
||||
let view = HomeEmptyView.loadFromNib()
|
||||
view.theme = ThemeService.shared().theme
|
||||
return view
|
||||
}
|
||||
|
||||
// MARK: - Life cycle
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
self.informationLabel.text = VectorL10n.homeEmptyViewInformation
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func fill(with displayName: String) {
|
||||
self.titleLabel.text = VectorL10n.homeEmptyViewTitle(displayName)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Themable
|
||||
extension HomeEmptyView: Themable {
|
||||
|
||||
func update(theme: Theme) {
|
||||
self.theme = theme
|
||||
|
||||
self.backgroundColor = theme.backgroundColor
|
||||
|
||||
self.titleLabel.textColor = theme.textPrimaryColor
|
||||
self.informationLabel.textColor = theme.textSecondaryColor
|
||||
}
|
||||
}
|
82
Riot/Modules/Home/Views/HomeEmptyView.xib
Normal file
82
Riot/Modules/Home/Views/HomeEmptyView.xib
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
|
||||
<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"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" interfaceStyle="light" id="iN0-l3-epB" customClass="HomeEmptyView" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t3v-kk-6CZ">
|
||||
<rect key="frame" x="167" y="422.5" width="500" height="329"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_placeholder_artwork" translatesAutoresizingMaskIntoConstraints="NO" id="zqO-Va-GFE">
|
||||
<rect key="frame" x="74.5" y="0.0" width="351" height="210"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="zqO-Va-GFE" secondAttribute="height" multiplier="117:70" id="8wR-xM-Yr6"/>
|
||||
<constraint firstAttribute="width" priority="750" constant="351" id="YYD-3y-TVU"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to Element, displayname" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bE0-ZK-O5U">
|
||||
<rect key="frame" x="20" y="244" width="460" height="26.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The all-in-one secure chat app for teams, friends and organisations. Tap the + to add people and rooms." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oDI-nL-0YT">
|
||||
<rect key="frame" x="20" y="290.5" width="460" height="38.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zqO-Va-GFE" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="t3v-kk-6CZ" secondAttribute="leading" constant="20" id="9BF-g4-67e"/>
|
||||
<constraint firstItem="bE0-ZK-O5U" firstAttribute="leading" secondItem="t3v-kk-6CZ" secondAttribute="leading" constant="20" id="Kwy-Zn-eMU"/>
|
||||
<constraint firstItem="oDI-nL-0YT" firstAttribute="leading" secondItem="bE0-ZK-O5U" secondAttribute="leading" id="S5F-Gm-C9u"/>
|
||||
<constraint firstAttribute="bottom" secondItem="oDI-nL-0YT" secondAttribute="bottom" id="b0H-Xf-aPl"/>
|
||||
<constraint firstItem="bE0-ZK-O5U" firstAttribute="top" secondItem="zqO-Va-GFE" secondAttribute="bottom" constant="34" id="bge-Ww-e17"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="zqO-Va-GFE" secondAttribute="trailing" constant="20" id="e3g-cO-CHE"/>
|
||||
<constraint firstItem="oDI-nL-0YT" firstAttribute="trailing" secondItem="bE0-ZK-O5U" secondAttribute="trailing" id="gQR-kx-Uhd"/>
|
||||
<constraint firstAttribute="width" priority="750" constant="500" id="gjt-uV-AcJ"/>
|
||||
<constraint firstItem="zqO-Va-GFE" firstAttribute="top" secondItem="t3v-kk-6CZ" secondAttribute="top" id="jy7-kx-A43"/>
|
||||
<constraint firstItem="zqO-Va-GFE" firstAttribute="centerX" secondItem="t3v-kk-6CZ" secondAttribute="centerX" id="qQk-qi-UI1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bE0-ZK-O5U" secondAttribute="trailing" constant="20" id="uk3-KG-AIo"/>
|
||||
<constraint firstItem="oDI-nL-0YT" firstAttribute="top" secondItem="bE0-ZK-O5U" secondAttribute="bottom" constant="20" id="w5K-Ws-VAa"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="t3v-kk-6CZ" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" priority="750" id="W8b-rv-ohe"/>
|
||||
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="t3v-kk-6CZ" secondAttribute="trailing" id="dMQ-uX-M5v"/>
|
||||
<constraint firstItem="t3v-kk-6CZ" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="kei-a8-rSq"/>
|
||||
<constraint firstItem="t3v-kk-6CZ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vUN-kp-3ea" secondAttribute="leading" id="nbt-PT-72V"/>
|
||||
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="t3v-kk-6CZ" secondAttribute="bottom" constant="10" id="roL-YU-0XB"/>
|
||||
</constraints>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="informationLabel" destination="oDI-nL-0YT" id="8Tl-sD-IsU"/>
|
||||
<outlet property="titleLabel" destination="bE0-ZK-O5U" id="IkE-pG-HZH"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="139" y="92"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="home_placeholder_artwork" width="351" height="210"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
Loading…
Reference in a new issue