chore: show "Fetch messages" chat context menu action when in debug mode (#13445)
This commit is contained in:
parent
3d1c98717a
commit
69d4c8824b
|
@ -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")
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue