status-desktop/ui/app/AppLayouts/Profile/stores/NotificationsStore.qml
Jonathan Rainville 30f1529471
fix(notifs): only fetch notification exemptions when going to the page (#16166)
Fixes #16165

All the logs about `settings_notificationsGetExPersonalMentions` are only to populate the model in the Notifications settings view, so it was pointless to load them on app start.
Now we lazy load them on loading that page.

An additional improvement that could be done later is to make it async and/or create a new API that gets all the DB info in one shot, because calling 4 APIs for each chat and community is a bit useless.
2024-08-22 14:48:04 -04:00

23 lines
620 B
QML

import QtQuick 2.13
import utils 1.0
QtObject {
id: root
property var notificationsModule
property var exemptionsModel: notificationsModule.exemptionsModel
function loadExemptions() {
root.notificationsModule.loadExemptions()
}
function sendTestNotification(title, message) {
root.notificationsModule.sendTestNotification(title, message)
}
function saveExemptions(itemId, muteAllMessages, personalMentions, globalMentions, allMessages) {
root.notificationsModule.saveExemptions(itemId, muteAllMessages, personalMentions, globalMentions, allMessages)
}
}