Feature/3449 release prep

This commit is contained in:
Frank Rotermund
2022-08-04 05:15:53 +00:00
parent c12cb45f61
commit 4c8c8cd19a
18 changed files with 144 additions and 31 deletions

View File

@@ -1,4 +1,27 @@
Changes in BWI project 1.23.0 (2022-08-02)
===================================================
Upstream merge ✨:
- v1.8.18
Features ✨:
Improvements 🙌:
- Better ignored users screen
- preparation for old app version warning
Bugfix 🐛:
Translations 🗣 :
SDK API changes ⚠️:
+Build 🧱:
- Nexus upload for artifacts
- testflight builds for BundesMessenger and BundesMessenger-Beta
Changes in BWI project 1.22.0 (2022-06-25)
===================================================

View File

@@ -503,7 +503,7 @@ final class BuildSettings: NSObject {
static let bwiResetPersonalNotesAccountData : Bool = false
// MARK BWI personal state
static let bwiPersonalState : Bool = true
static let bwiPersonalState : Bool = false
// MARK BWI personal notes room
static let bwiRollsAndRights : Bool = true

View File

@@ -7,13 +7,14 @@ DATE_STR=$5
GITHASH=$6
SUBDIR=$7
echo "params: $NEXUS_BASE_URL $VARIANT $EXT $VERSION $DATE_STR $GITHASH"
echo "params: $NEXUS_BASE_URL $VARIANT $EXT $VERSION $DATE_STR $GITHASH $SUBDIR"
echo "dir: $PWD"
find ../out-sim -name "*$VARIANT*.$EXT" -print0 | while read -d $'\0' file
find ../out$SUBDIR -name "*$VARIANT*.$EXT" -print0 | while read -d $'\0' file
do
echo "Source: $file"
BASENAME=$(basename $file .$EXT)-$VERSION-$DATE_STR-$GITHASH.$EXT$SUBDIR.$EXT
zip -r $file.zip $file
BASENAME=$(basename $file .$EXT.zip)-$VERSION-$DATE_STR-$GITHASH.$EXT$SUBDIR.$EXT.zip
echo "Destination $NEXUS_BASE_URL/$VERSION/$BASENAME"
curl --fail -u $S_BWMESSENGER_ID:$S_BWMESSENGER_PASSWORD -v --upload-file $file $NEXUS_BASE_URL/$VERSION/$BASENAME
curl --fail -u $S_BWMESSENGER_ID:$S_BWMESSENGER_PASSWORD -v --upload-file $file.zip $NEXUS_BASE_URL/$VERSION/$BASENAME
done

View File

@@ -78,3 +78,5 @@
"bwi_timeline_userlabel_added_for_user" = "%@ zur Funktion ernannt: %@";
"bwi_timeline_userlabel_prefix_you" = "Du hast %@";
"bwi_timeline_userlabel_prefix_other_user" = "%@ hat %@";
"bwi_settings_ignored_users_text" = "Ignorierte Nutzer";

View File

@@ -151,6 +151,7 @@
"room_participants_remove_prompt_msg" = "Bist du sicher, dass du %@ aus dem Chat entfernen möchtest?";
"room_participants_invite_prompt_title" = "Bestätigung";
"room_participants_invite_prompt_msg" = "Bist du sicher, dass du %@ in diesen Chat einladen möchtest?";
"room_participants_invite_prompt_to_msg" = "Bist du sicher, dass du %@ zu %@ einladen möchtest";
"room_participants_filter_room_members" = "Filtere Raum-Mitglieder";
"room_participants_filter_room_members_for_dm" = "Mitglieder filtern";
"room_participants_filter_room_members" = "Mitglieder filtern";

View File

@@ -75,3 +75,5 @@
"bwi_timeline_userlabel_added_for_user" = "added for user %@ the function: %@";
"bwi_timeline_userlabel_prefix_you" = "You %@s";
"bwi_timeline_userlabel_prefix_other_user" = "%@s";
"bwi_settings_ignored_users_text" = "Ignored users";

View File

@@ -26,6 +26,19 @@
</style>
</head>
<body>
<div>
<p>
<b>Version 1.23.0</b>
</p>
<p>
<b>Verbesserungen</b>
<ul>
<li/>Die Anzeige ignorierter Nutzer wurde verbessert und an die anderen Plattformen angeglichen.
</ul>
</p>
</div>
<br>
<div>
<p>
<b>Version 1.22.0</b>

View File

@@ -2073,7 +2073,12 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
MXKAccount *account = notif.object;
if (!account.isSoftLogout)
{
[account removeObserver:self forKeyPath:@"enableInAppNotifications"];
// bwi add the try because sometimes there is no observer here when logging out
@try{
[account removeObserver:self forKeyPath:@"enableInAppNotifications"];
}@catch(id anException){
//do nothing, obviously it wasn't attached because an exception was thrown
}
}
// Clear Modular data

View File

@@ -106,6 +106,17 @@ class AvatarView: UIView, Themable {
return
}
// bwi use custom image for personal notes room
if BwiBuildSettings.bwiUseCustomPersonalNotesAvatar {
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession {
let service = PersonalNotesDefaultService(mxSession: session)
if let personalNotesRoomId = service.personalNotesRoomId(), personalNotesRoomId == viewData.matrixItemId {
avatarImageView.image = UIImage(named: service.avatarImageUrl())
return
}
}
}
let defaultAvatarImage: UIImage?
var defaultAvatarImageContentMode: UIView.ContentMode = .scaleAspectFill

View File

@@ -1279,9 +1279,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
NSArray<UIContextualAction*> *actions = nil;
// bwi use our set of room actions (no low priority, no move to chat
if ( [room isPersonalNotesRoom]) {
actions = @[
favouriteAction
];
} else {
actions = @[

View File

@@ -34,13 +34,28 @@ class RoomActionProvider: RoomActionProviderProtocol {
var menu: UIMenu {
if service.isRoomJoined {
return UIMenu(children: [
self.directChatAction,
self.notificationsAction,
self.favouriteAction,
self.lowPriorityAction,
self.leaveAction
])
// bwi use our set of actions
if BwiBuildSettings.bwiFilteredContextMenu {
if service.roomId == PersonalNotesDefaultService(mxSession: service.session).personalNotesRoomId() {
return UIMenu(children: [
self.notificationsAction
])
} else {
return UIMenu(children: [
self.notificationsAction,
self.favouriteAction,
self.leaveAction
])
}
} else {
return UIMenu(children: [
self.directChatAction,
self.notificationsAction,
self.favouriteAction,
self.lowPriorityAction,
self.leaveAction
])
}
} else {
if service.roomMembership == .invite {
return UIMenu(children: [

View File

@@ -159,10 +159,7 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
- (void)setTextMessage:(NSString *)textMessage
{
if (!textMessage)
{
[self setAttributedTextMessage:nil];
}
[self setAttributedTextMessage:textMessage ? [[NSAttributedString alloc] initWithString:textMessage] : nil];
}
- (void)setAttributedTextMessage:(NSAttributedString *)attributedTextMessage

View File

@@ -109,8 +109,9 @@ final class SecretsResetViewController: UIViewController {
}
private func setupViews() {
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession {
if session.homeserverWellknown.backupRequired() {
// bwi resolve crash when wellknown not ready (reset phrase at app start) but generally the inclusion of the cancel button looks wrong
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession, let wellKnown = session.homeserverWellknown {
if !wellKnown.backupRequired() {
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.cancel, style: .plain) { [weak self] in
self?.cancelButtonAction()
}

View File

@@ -336,7 +336,9 @@ TableViewSectionsDelegate>
}
else
{
sessionsSection.footerTitle = VectorL10n.securitySettingsCryptoSessionsDescription2;
if (BwiBuildSettings.bwiShowSessionSettingsFooter) {
sessionsSection.footerTitle = VectorL10n.securitySettingsCryptoSessionsDescription2;
}
[sessionsSection addRowsWithCount:devicesArray.count];
}

View File

@@ -421,7 +421,9 @@ ThreadsBetaCoordinatorBridgePresenterDelegate>
Section *sectionUserSettings = [Section sectionWithTag:SECTION_TAG_USER_SETTINGS];
[sectionUserSettings addRowWithTag:USER_SETTINGS_PROFILE_PICTURE_INDEX];
[sectionUserSettings addRowWithTag:USER_SETTINGS_DISPLAYNAME_INDEX];
[sectionUserSettings addRowWithTag:USER_SETTINGS_PERSONAL_STATE_INDEX];
if (BwiBuildSettings.bwiEnablePersonalState) {
[sectionUserSettings addRowWithTag:USER_SETTINGS_PERSONAL_STATE_INDEX];
}
if (RiotSettings.shared.settingsScreenShowChangePassword)
{
[sectionUserSettings addRowWithTag:USER_SETTINGS_CHANGE_PASSWORD_INDEX];
@@ -527,9 +529,11 @@ ThreadsBetaCoordinatorBridgePresenterDelegate>
sectionNotificationSettings.footerTitle = [VectorL10n settingsGlobalSettingsInfo:AppInfo.current.displayName];
}
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_MISSED_NOTIFICATIONS_INDEX];
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_UNREAD_INDEX];
if (BwiBuildSettings.bwiShowPinnedNotificationSettings) {
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_MISSED_NOTIFICATIONS_INDEX];
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_UNREAD_INDEX];
}
if (@available(iOS 14.0, *)) {
if (RiotSettings.shared.settingsNotificationsShowDefault) {
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_DEFAULT_SETTINGS_INDEX];
@@ -2508,10 +2512,13 @@ ThreadsBetaCoordinatorBridgePresenterDelegate>
{
MXKTableViewCell *ignoredUserCell = [self getDefaultTableViewCell:tableView];
if (BwiBuildSettings.bwiBetterIgnoredUsers) {
ignoredUserCell.textLabel.text = [VectorL10n settingsIgnoredUsers];
ignoredUserCell.textLabel.text = NSLocalizedStringFromTable(@"bwi_settings_ignored_users_text", @"Bwi", nil);
} else {
ignoredUserCell.textLabel.text = session.ignoredUsers[row];
}
[ignoredUserCell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
cell = ignoredUserCell;
}
else if (section == SECTION_TAG_LOCAL_CONTACTS)

View File

@@ -1227,6 +1227,11 @@
[room setAvatar:@"" success:nil failure:nil];
}
}
MXRoom* room = [mainSession roomWithRoomId:[service personalNotesRoomId]];
if (room && [room.summary.avatar length] > 0) {
[room setAvatar:@"" success:nil failure:nil];
}
}
}
}

View File

@@ -75,4 +75,10 @@ final class BwiBuildSettings: NSObject {
static let bwiLocationShareButtonVisible = false
static let bwiUseCustomPersonalNotesAvatar = true
static let bwiBetterIgnoredUsers = true
static let bwiFilteredContextMenu = true
static let bwiShowPinnedNotificationSettings = false
static let bwiShowSessionSettingsFooter = false
static let bwiEnablePersonalState = false
}

View File

@@ -26,10 +26,14 @@ import SwiftUI
}
struct IgnoredUsersView: View {
@Environment(\.theme) private var theme
var session: MXSession?
var ignoredUsers: [IgnoredUser]
@State private var appearanceSavedColor: UIColor?
init(session: MXSession?) {
self.session = session
ignoredUsers = []
@@ -49,10 +53,24 @@ struct IgnoredUsersView: View {
}
var body: some View {
List(ignoredUsers) { user in
IgnoredUserView(session:session, user: user)
ZStack {
theme.colors.system
.ignoresSafeArea()
List(ignoredUsers) { user in
IgnoredUserView(session:session, user: user)
}
.onAppear {
// Set the default to clear
appearanceSavedColor = UITableView.appearance().backgroundColor
UITableView.appearance().backgroundColor = .clear
}
.onDisappear() {
if let appearanceSavedColor = appearanceSavedColor {
UITableView.appearance().backgroundColor = appearanceSavedColor
}
}
}
.navigationTitle(NSLocalizedString("bwi_notification_times", tableName: "Bwi", comment: ""))
.navigationTitle(NSLocalizedString("bwi_settings_ignored_users_text", tableName: "Bwi", comment: ""))
.navigationBarTitleDisplayMode(.inline)
}
}
@@ -63,6 +81,8 @@ fileprivate struct IgnoredUserView: View {
let session: MXSession?
let user: IgnoredUser
@Environment(\.theme) private var theme
var body: some View {
Button (action: {
showingAlert = true
@@ -73,11 +93,14 @@ fileprivate struct IgnoredUserView: View {
VStack(alignment: .leading, spacing: 6) {
Text(user.displayName)
.font(Font.body.bold())
.foregroundColor(theme.colors.primaryContent)
Text(user.matrixId)
.foregroundColor(.gray)
.foregroundColor(theme.colors.secondaryContent)
}
}
}
.listRowBackground(theme.colors.background)
.alert(isPresented:$showingAlert) {
Alert(
title: Text(VectorL10n.settingsUnignoreUser(self.user.displayName)),
@@ -88,7 +111,6 @@ fileprivate struct IgnoredUserView: View {
secondaryButton: .cancel()
)
}
}
}