Skip to content

Commit 809ed28

Browse files
committed
fix(pinned/search popups): use short date format
- use `Locale.ShortFormat` in AppSearch and PinnedMessagesPopup - fixes message headers overflowing on mobile Fixes #19334
1 parent 7994a35 commit 809ed28

File tree

6 files changed

+5
-17
lines changed

6 files changed

+5
-17
lines changed

storybook/pages/ActivityNotificationTransferOwnershipPage.qml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import utils
1414
ActivityNotificationBaseLayout {
1515
id: root
1616

17-
property bool showFullTimestamp
18-
1917
showBaseEditorFields: false
2018
communityEditorActive: true
2119
contactEditorActive: false
@@ -24,7 +22,6 @@ ActivityNotificationBaseLayout {
2422
type: setType(notification)
2523
communityName: communityEditor.communityMock.name
2624
communityColor: communityEditor.communityMock.color
27-
showFullTimestamp: root.showFullTimestamp
2825

2926
onFinaliseOwnershipClicked: logs.logEvent("ActivityNotificationTransferOwnership::onFinaliseOwnershipClicked")
3027
onNavigateToCommunityClicked: logs.logEvent("ActivityNotificationTransferOwnership::onNavigateToCommunityClicked")
@@ -58,12 +55,6 @@ ActivityNotificationBaseLayout {
5855
text: "No longer control node"
5956
onCheckedChanged: if(checked) baseEditor.notificationBaseMock.notificationType = ActivityCenterTypes.ActivityCenterNotificationType.OwnershipLost
6057
}
61-
62-
Switch {
63-
text: "Show full timestamp"
64-
checked: root.showFullTimestamp
65-
onCheckedChanged: root.showFullTimestamp = checked
66-
}
6758
}
6859

6960
}

ui/StatusQ/src/StatusQ/Components/StatusMessage.qml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ Control {
267267
onClicked: (sender) => root.senderNameClicked(sender)
268268
onResendClicked: root.resendClicked()
269269
timestamp: root.timestamp
270-
showFullTimestamp: root.isInPinnedPopup
271270
displayNameClickable: root.profileClickable
272271
outgoingStatus: root.outgoingStatus
273272
showOutgointStatusLabel: root.hovered && !root.isInPinnedPopup
@@ -383,7 +382,7 @@ Control {
383382

384383
Loader {
385384
Layout.fillWidth: true
386-
Layout.rightMargin: 16
385+
Layout.rightMargin: Theme.padding
387386
active: root.editMode
388387
visible: active
389388
sourceComponent: StatusEditMessage {
@@ -418,7 +417,7 @@ Control {
418417
active: root.hovered && root.quickActions.length > 0
419418
anchors.right: parent.right
420419
anchors.rightMargin: Theme.padding
421-
anchors.top: root.top
420+
anchors.top: parent.top
422421
sourceComponent: StatusMessageQuickActions {
423422
items: root.quickActions
424423
}

ui/app/AppLayouts/ActivityCenter/views/ActivityNotificationTransferOwnership.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ ActivityNotificationBase {
2323
required property string communityName
2424
required property string communityColor
2525
required property int type // Possible values [OwnershipState]
26-
property bool showFullTimestamp: false
2726

2827
signal finaliseOwnershipClicked
2928
signal navigateToCommunityClicked

ui/app/AppLayouts/Chat/views/ChatMessagesView.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Item {
116116

117117
Connections {
118118
target: Qt.application
119-
onStateChanged: {
120-
if (Qt.application.state == Qt.ApplicationActive) {
119+
function onStateChanged() {
120+
if (Qt.application.state === Qt.ApplicationActive) {
121121
d.markAllMessagesReadIfMostRecentMessageIsInViewport()
122122
}
123123
}

ui/app/mainui/AppSearch.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Item {
8484
searchOptionsPopupMenu: searchPopupMenu
8585
searchResults: root.store.resultModel
8686
formatTimestampFn: function (ts) {
87-
return LocaleUtils.formatDateTime(parseInt(ts, 10))
87+
return LocaleUtils.formatDateTime(parseInt(ts, 10), Locale.ShortFormat)
8888
}
8989
onSearchTextChanged: {
9090
if (searchPopup.searchText !== "") {

ui/imports/shared/views/chat/MessageView.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,6 @@ Loader {
694694
StatusTimeStampLabel {
695695
Layout.alignment: Qt.AlignVCenter
696696
timestamp: root.messageTimestamp
697-
showFullTimestamp: false
698697
}
699698
}
700699
}

0 commit comments

Comments
 (0)