Skip to content

Commit

Permalink
Resolve conflicts on Rebase/Element-v1.10.4 into Tchap
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Buquet committed Mar 22, 2023
1 parent ca63f57 commit bdd287b
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 126 deletions.
5 changes: 0 additions & 5 deletions Config/AppVersion.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,5 @@
//

// Version
<<<<<<< HEAD
MARKETING_VERSION = 2.4.0
CURRENT_PROJECT_VERSION = 1
=======
MARKETING_VERSION = 1.10.4
CURRENT_PROJECT_VERSION = 1.10.4
>>>>>>> v1.10.4
6 changes: 1 addition & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

<<<<<<< HEAD
PODFILE CHECKSUM: 0afab42ecd7071cee7a01ad5f1b007aef3378d0e
=======
PODFILE CHECKSUM: 829420858b6f935bbfe58eb25a0533d799ccd78a
>>>>>>> v1.10.4
PODFILE CHECKSUM: 78b18c3b1d61fa45369c1a87a2273ab77cae1966

COCOAPODS: 1.11.3
4 changes: 0 additions & 4 deletions Riot/Modules/Home/AllChats/AllChatsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,7 @@ class AllChatsViewController: HomeViewController {

private func updateUI() {
let currentSpace = self.dataSource?.currentSpace
<<<<<<< HEAD
self.title = currentSpace?.summary?.displayname ?? VectorL10n.titleHome
=======
self.title = currentSpace?.summary?.displayName ?? VectorL10n.allChatsTitle
>>>>>>> v1.10.4

setupEditOptions()
updateToolbar(with: editActionProvider.updateMenu(with: mainSession, parentSpace: currentSpace, completion: { [weak self] menu in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ final class KeyVerificationVerifiedViewController: UIViewController {
self.titleLabel.text = VectorL10n.deviceVerificationVerifiedTitle
self.informationLabel.text = TchapL10n.deviceVerificationVerifiedDescription

<<<<<<< HEAD
=======
self.titleLabel.text = bodyTitle
self.informationLabel.text = informationText

>>>>>>> v1.10.4
self.doneButton.setTitle(VectorL10n.deviceVerificationVerifiedGotItButton, for: .normal)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
<!--Key Verification Verify BySAS View Controller-->
<scene sceneID="mt5-wz-YKA">
<objects>
<<<<<<< HEAD
<viewController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="V8j-Lb-PgC" customClass="KeyVerificationVerifyBySASViewController" customModule="Tchap" customModuleProvider="target" sceneMemberID="viewController">
=======
<viewController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="V8j-Lb-PgC" customClass="KeyVerificationVerifyBySASViewController" customModule="Element" customModuleProvider="target" sceneMemberID="viewController">
>>>>>>> v1.10.4
<view key="view" contentMode="scaleToFill" id="EL9-GA-lwo">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -64,11 +60,7 @@
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<<<<<<< HEAD
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="VerifyEmojiCollectionViewCell" id="iG2-Pq-pYr" customClass="VerifyEmojiCollectionViewCell" customModule="Tchap" customModuleProvider="target">
=======
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="VerifyEmojiCollectionViewCell" id="iG2-Pq-pYr" customClass="VerifyEmojiCollectionViewCell" customModule="Element" customModuleProvider="target">
>>>>>>> v1.10.4
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
Expand Down Expand Up @@ -110,11 +102,7 @@
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="6xJ-uL-C85">
<rect key="frame" x="20" y="377.5" width="335" height="44"/>
<subviews>
<<<<<<< HEAD
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zsb-KY-oCN" customClass="RoundedButton" customModule="Tchap" customModuleProvider="target">
=======
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zsb-KY-oCN" customClass="RoundedButton" customModule="Element" customModuleProvider="target">
>>>>>>> v1.10.4
<rect key="frame" x="0.0" y="0.0" width="162.5" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<inset key="contentEdgeInsets" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
Expand All @@ -125,11 +113,7 @@
<action selector="cancelButtonAction:" destination="V8j-Lb-PgC" eventType="touchUpInside" id="1NK-nX-rMW"/>
</connections>
</button>
<<<<<<< HEAD
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FvW-07-g2Q" customClass="RoundedButton" customModule="Tchap" customModuleProvider="target">
=======
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FvW-07-g2Q" customClass="RoundedButton" customModule="Element" customModuleProvider="target">
>>>>>>> v1.10.4
<rect key="frame" x="172.5" y="0.0" width="162.5" height="44"/>
<inset key="contentEdgeInsets" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
<state key="normal" title="They match">
Expand Down
5 changes: 0 additions & 5 deletions Riot/Modules/Room/MXKRoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -891,15 +891,10 @@ - (void)joinRoom:(void(^)(MXKRoomViewControllerJoinRoomResult result))completion
}

} failure:^(NSError *error) {
<<<<<<< HEAD
if (cancelIndicator) {
cancelIndicator();
}
MXLogDebug(@"[MXKRoomVC] Failed to join room (%@)", self->roomDataSource.room.summary.displayname);
=======
cancelIndicator();
MXLogDebug(@"[MXKRoomVC] Failed to join room (%@)", self->roomDataSource.room.summary.displayName);
>>>>>>> v1.10.4
[self processRoomJoinFailureWithError:error completion:completion];
}];
}
Expand Down
73 changes: 1 addition & 72 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7551,9 +7551,7 @@ - (void)updateThreadListBarButtonBadgeWith:(MXThreadingService *)service

- (void)updateThreadListBarButtonItem:(UIBarButtonItem *)barButtonItem with:(MXThreadingService *)service
{
<<<<<<< HEAD
// Tchap: Threads are disabled in Tchap
// if (!service)
// if (!service || _isWaitingForOtherParticipants)
// {
// return;
// }
Expand Down Expand Up @@ -7620,75 +7618,6 @@ - (void)updateThreadListBarButtonItem:(UIBarButtonItem *)barButtonItem with:(MXT
// NSMutableArray<UIBarButtonItem*> *items = [self.navigationItem.rightBarButtonItems mutableCopy];
// items[replaceIndex] = threadListBarButtonItem;
// self.navigationItem.rightBarButtonItems = items;
=======
if (!service || _isWaitingForOtherParticipants)
{
return;
}

__block NSInteger replaceIndex = NSNotFound;
[self.navigationItem.rightBarButtonItems enumerateObjectsUsingBlock:^(UIBarButtonItem * _Nonnull item, NSUInteger index, BOOL * _Nonnull stop)
{
if (item.tag == kThreadListBarButtonItemTag)
{
replaceIndex = index;
*stop = YES;
}
}];

if (!barButtonItem && replaceIndex == NSNotFound)
{
// there is no thread list bar button item, and not provided another to update
// ignore
return;
}

UIBarButtonItem *threadListBarButtonItem = barButtonItem ?: [self threadListBarButtonItem];
UIButton *button = (UIButton *)threadListBarButtonItem.customView;

MXThreadNotificationsCount *notificationsCount = [service notificationsCountForRoom:self.roomDataSource.roomId];

UIImage *buttonIcon = [AssetImages.threadsIcon.image vc_resizedWith:kThreadListBarButtonItemImageSize];
[button setImage:buttonIcon forState:UIControlStateNormal];
button.contentEdgeInsets = kThreadListBarButtonItemContentInsetsNoDot;

if (notificationsCount.notificationsNumber > 0)
{
BadgeLabel *badgeLabel = [[BadgeLabel alloc] init];
badgeLabel.text = notificationsCount.notificationsNumber > 99 ? @"99+" : [NSString stringWithFormat:@"%lu", notificationsCount.notificationsNumber];
id<Theme> theme = ThemeService.shared.theme;
badgeLabel.font = theme.fonts.caption1SB;
badgeLabel.textColor = theme.colors.navigation;
badgeLabel.badgeColor = notificationsCount.numberOfHighlightedThreads ? theme.colors.alert : theme.colors.secondaryContent;
[button addSubview:badgeLabel];

[badgeLabel layoutIfNeeded];

badgeLabel.translatesAutoresizingMaskIntoConstraints = NO;
[badgeLabel.centerYAnchor constraintEqualToAnchor:button.centerYAnchor
constant:badgeLabel.bounds.size.height - buttonIcon.size.height / 2].active = YES;
[badgeLabel.centerXAnchor constraintEqualToAnchor:button.centerXAnchor
constant:badgeLabel.bounds.size.width + buttonIcon.size.width / 2].active = YES;
}

if (replaceIndex == NSNotFound)
{
// there is no thread list bar button item, this was only an update
return;
}

UIBarButtonItem *originalItem = self.navigationItem.rightBarButtonItems[replaceIndex];
UIButton *originalButton = (UIButton *)originalItem.customView;
if ([originalButton imageForState:UIControlStateNormal] == [button imageForState:UIControlStateNormal]
&& UIEdgeInsetsEqualToEdgeInsets(originalButton.contentEdgeInsets, button.contentEdgeInsets))
{
// no need to replace, it's the same
return;
}
NSMutableArray<UIBarButtonItem*> *items = [self.navigationItem.rightBarButtonItems mutableCopy];
items[replaceIndex] = threadListBarButtonItem;
self.navigationItem.rightBarButtonItems = items;
>>>>>>> v1.10.4
}

#pragma mark - RoomContextualMenuViewControllerDelegate
Expand Down
9 changes: 0 additions & 9 deletions RiotNSE/NotificationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,10 @@ class NotificationService: UNNotificationServiceExtension {

// If a room summary is available, use the displayname for the best attempt title.
guard let roomSummary = NotificationService.backgroundSyncService.roomSummary(forRoomId: roomId) else { return }
<<<<<<< HEAD
guard let roomDisplayName = roomSummary.displayname else { return }
if roomSummary.isDirect == true {
bestAttemptContents[eventId]?.body = NSString.localizedUserNotificationString(forKey: "MESSAGE_FROM_X", arguments: [roomDisplayName as Any])
} else {
bestAttemptContents[eventId]?.body = NSString.localizedUserNotificationString(forKey: "MESSAGE_IN_X", arguments: [roomDisplayName as Any])
}
=======
guard let roomDisplayName = roomSummary.displayName else { return }
bestAttemptContents[eventId]?.title = roomDisplayName

// At this stage we don't know the message type, so leave the body as set in didReceive.
>>>>>>> v1.10.4
}

private func fetchAndProcessEvent(withEventId eventId: String, roomId: String) {
Expand Down
3 changes: 0 additions & 3 deletions RiotShareExtension/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,10 @@ targets:
- path: ../Riot/Categories/Character.swift
- path: ../Riot/Categories/MXKImageView.swift
- path: ../Riot/Categories/MXRoom+Riot.m
<<<<<<< HEAD
=======
- path: ../Config/Configurable.swift
- path: ../Config/CommonConfiguration.swift
- path: ../Riot/Experiments/
- path: ../Riot/Utils/UserNameColorGenerator.swift
>>>>>>> v1.10.4
- path: ../Riot/Categories/MXRoomSummary+Riot.m
- path: ../Riot/Categories/String.swift
- path: ../Riot/Categories/UIColor.swift
Expand Down
2 changes: 2 additions & 0 deletions Tchap/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ internal enum TchapL10n {
internal static let roomTitleUnrestrictedRoom = TchapL10n.tr("Tchap", "room_title_unrestricted_room", fallback: "Salon accessible aux externes")
/// Aucun résultat
internal static let searchNoResult = TchapL10n.tr("Tchap", "search_no_result", fallback: "Aucun résultat")
/// Clé copiée
internal static let secretsSetupRecoveryKeyExportActionDone = TchapL10n.tr("Tchap", "secrets_setup_recovery_key_export_action_done", fallback: "Clé copiée")
/// Changer le mot de passe réinitialise les clés de chiffrement sur tous les appareils, rendant l’historique des discussions illisible: pensez d'abord à exporter vos clés pour pouvoir les ré-importer après le changement de mot de passe.
internal static let settingsChangePwdCaution = TchapL10n.tr("Tchap", "settings_change_pwd_caution", fallback: "Changer le mot de passe réinitialise les clés de chiffrement sur tous les appareils, rendant l’historique des discussions illisible: pensez d'abord à exporter vos clés pour pouvoir les ré-importer après le changement de mot de passe.")
/// Je vais patienter
Expand Down
3 changes: 2 additions & 1 deletion Tchap/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ targetTemplates:
- package: DeviceKit
- package: SwiftOGG
- package: WysiwygComposer
- package: AnalyticsEvents

preBuildScripts:
- name: 🛠 Environment
Expand All @@ -78,7 +79,6 @@ targetTemplates:
- path: ../Config/Project-Warnings.xcconfig
- path: ../Config/AppIdentifiers.xcconfig
- path: ../Config/CommonConfiguration.swift
- path: ../Config/CryptoSDKConfiguration.swift
- path: ../Config/Configurable.swift
- path: ../Tchap
excludes:
Expand Down Expand Up @@ -133,6 +133,7 @@ targetTemplates:
- path: ../Riot/Assets/third_party_licenses.html
- path: ../Riot/Categories
- path: ../Riot/Coordinators
- path: ../Riot/Experiments/
- path: ../Riot/Generated/UntranslatedStrings.swift
- path: ../Riot/Generated/Vector_Strings.swift
- path: ../Riot/Managers/AppInfo
Expand Down
3 changes: 3 additions & 0 deletions TchapTests/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ targets:
# Riot
- path: ../Riot/Categories/Bundle.swift
- path: ../Riot/Categories/MXRoom+VoiceBroadcast.swift
- path: ../Riot/Experiments/
- path: ../Riot/Generated/Vector_Strings.swift
- path: ../Riot/Managers/AppInfo
- path: ../Riot/Managers/Locale
- path: ../Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift
- path: ../Riot/Managers/KeyValueStorage/
- path: ../Riot/Managers/Settings/RiotSettings.swift
- path: ../Riot/Managers/UserSessions
- path: ../Riot/Modules/Room/TimelineCells/Styles/RoomTimelineStyleIdentifier.swift
- path: ../Riot/Modules/Analytics
- path: ../Riot/Modules/VoiceBroadcast
- path: ../Riot/PropertyWrappers

Expand Down

0 comments on commit bdd287b

Please sign in to comment.