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 id: contextMenu
objectName: "moreOptionsContextMenu" objectName: "moreOptionsContextMenu"
emojiPopup: root.emojiPopup emojiPopup: root.emojiPopup
showDebugOptions: root.rootStore.isDebugEnabled
openHandler: function () { openHandler: function () {
if(!chatContentModule) { if(!chatContentModule) {
console.debug("error on open chat context menu handler - chat content module is not set") console.debug("error on open chat context menu handler - chat content module is not set")

View File

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

View File

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

View File

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