mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 18:18:38 +00:00
feat: hide fetch old messages after 30 days
This commit is contained in:
parent
90e9e2d192
commit
3fef5c7a69
@ -167,7 +167,13 @@ Item {
|
|||||||
Component {
|
Component {
|
||||||
id: fetchMoreMessagesButtonComponent
|
id: fetchMoreMessagesButtonComponent
|
||||||
Item {
|
Item {
|
||||||
visible: chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.activeChannel.isMember
|
property int gapNowAndOldestTimestamp: Date.now() / 1000 - chatsModel.oldestMsgTimestamp
|
||||||
|
|
||||||
|
visible: {
|
||||||
|
|
||||||
|
return gapNowAndOldestTimestamp < Constants.maxNbDaysToFetch * Constants.fetchRangeLast24Hours &&
|
||||||
|
(chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.activeChannel.isMember)
|
||||||
|
}
|
||||||
id: wrapper
|
id: wrapper
|
||||||
height: wrapper.visible ? childrenRect.height + Style.current.smallPadding*2 : 0
|
height: wrapper.visible ? childrenRect.height + Style.current.smallPadding*2 : 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -13,6 +13,7 @@ QtObject {
|
|||||||
readonly property int communityChatInvitationOnlyAccess: 2
|
readonly property int communityChatInvitationOnlyAccess: 2
|
||||||
readonly property int communityChatOnRequestAccess: 3
|
readonly property int communityChatOnRequestAccess: 3
|
||||||
|
|
||||||
|
readonly property int maxNbDaysToFetch: 30
|
||||||
readonly property int fetchRangeLast24Hours: 86400
|
readonly property int fetchRangeLast24Hours: 86400
|
||||||
readonly property int fetchRangeLast2Days: 172800
|
readonly property int fetchRangeLast2Days: 172800
|
||||||
readonly property int fetchRangeLast3Days: 259200
|
readonly property int fetchRangeLast3Days: 259200
|
||||||
|
Loading…
x
Reference in New Issue
Block a user