Merge branch 'feature/4197_status_messages_cut_off' into 'develop'

MESSENGER-4197 fix status messages cut off

See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!104
This commit is contained in:
Frank Rotermund
2023-03-07 12:14:51 +00:00
6 changed files with 15 additions and 4 deletions
+3
View File
@@ -583,3 +583,6 @@
// MARK: - Chat creation
"room_creation_title" = "Neue Direktnachricht";
// MARK: - Notice Room
"notice_room_leave" = "%@ verließ den Raum";
+3
View File
@@ -462,3 +462,6 @@
// MARK: - Chat creation
"room_creation_title" = "New chat";
// MARK: - Notice Room
"notice_room_leave" = "%@ left";
+4
View File
@@ -903,6 +903,10 @@ public class BWIL10n: NSObject {
public static var next: String {
return BWIL10n.tr("Bwi", "next")
}
/// %@ verließ den Raum
public static func noticeRoomLeave(_ p1: String) -> String {
return BWIL10n.tr("Bwi", "notice_room_leave", p1)
}
/// Dein Account %@ wurde erstellt.
public static func onboardingCongratulationsMessage(_ p1: String) -> String {
return BWIL10n.tr("Bwi", "onboarding_congratulations_message", p1)
@@ -740,7 +740,7 @@ static NSString *const kRepliedTextPattern = @"<mx-reply>.*<blockquote>.*<br>(.*
}
else
{
displayText = [VectorL10n noticeRoomLeave:targetDisplayName];
displayText = [BWIL10n noticeRoomLeave:targetDisplayName];
}
}
}
@@ -24,8 +24,8 @@ extern NSString *const URLPreviewDidUpdateNotification;
typedef NS_ENUM(NSInteger, RoomBubbleCellDataTag)
{
RoomBubbleCellDataTagMessage = 0, // Default value used for messages
RoomBubbleCellDataTagMembership,
RoomBubbleCellDataTagRoomCreateConfiguration,
RoomBubbleCellDataTagMembership = 1, // bwi: default value for the room membership changes (status messages)
RoomBubbleCellDataTagRoomCreateConfiguration = 2, // bwi: default value for the room configuration (status messages)
RoomBubbleCellDataTagRoomCreateWithPredecessor,
RoomBubbleCellDataTagKeyVerificationNoDisplay,
RoomBubbleCellDataTagKeyVerificationRequestIncomingApproval,
@@ -895,7 +895,8 @@ static BOOL _disableLongPressGestureOnEvent;
id<RoomCellLayoutUpdating> cellLayoutUpdater = timelineConfiguration.currentStyle.cellLayoutUpdater;
// Handle updated text view layout if needed
if (cellLayoutUpdater)
// bwi: don't use cellLayoutUpdater for status messages (bubbleData.tag / RoomBubbleCellDataTag == 1 and 2), fixes cell sizing problem (status messages getting cut off)
if (cellLayoutUpdater && bubbleData.tag != 2 && bubbleData.tag != 1)
{
maxTextViewWidth = [cellLayoutUpdater maximumTextViewWidthFor:cell cellData:cellData maximumCellWidth:maxWidth];
}