chore: show "Fetch messages" chat context menu action when in debug mode (#13445)

This commit is contained in:
Igor Sirotin 2024-02-07 12:38:46 +00:00 committed by GitHub
parent 3d1c98717a
commit 69d4c8824b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 1 deletions

View File

@ -141,6 +141,7 @@ Item {
id: contextMenu
objectName: "moreOptionsContextMenu"
emojiPopup: root.emojiPopup
showDebugOptions: root.rootStore.isDebugEnabled
openHandler: function () {
if(!chatContentModule) {
console.debug("error on open chat context menu handler - chat content module is not set")

View File

@ -142,6 +142,7 @@ Item {
popupMenu: ChatContextMenuView {
id: chatContextMenuView
emojiPopup: root.emojiPopup
showDebugOptions: root.store.isDebugEnabled
openHandler: function (id) {
let jsonObj = root.chatSectionModule.getItemAsJson(id)

View File

@ -298,6 +298,7 @@ Item {
chatListPopupMenu: ChatContextMenuView {
id: chatContextMenuView
emojiPopup: root.emojiPopup
showDebugOptions: root.store.isDebugEnabledfir
// TODO pass the chatModel in its entirety instead of fetching the JSOn using just the id
openHandler: function (id) {

View File

@ -27,6 +27,7 @@ StatusMenu {
property int channelPosition: -1
property string chatCategoryId: ""
property var emojiPopup
property bool showDebugOptions: false
signal displayProfilePopup(string publicKey)
signal requestAllHistoricMessages(string chatId)
@ -127,7 +128,7 @@ StatusMenu {
objectName: "chatFetchMessagesMenuItem"
text: qsTr("Fetch messages")
icon.name: "download"
enabled: !production
enabled: root.showDebugOptions
onTriggered: {
root.requestMoreMessages(root.chatId)
}