Rename update_title
setting to show_tab_notifications
This commit is contained in:
parent
fb316ff010
commit
c002600ac5
|
@ -3,7 +3,7 @@
|
|||
## 8.0.0 (Unreleased)
|
||||
|
||||
- #1083: Add support for XEP-0393 Message Styling
|
||||
- New configuration setting: [](https://conversejs.org/docs/html/configuration.html#trusted) instead.
|
||||
- New configuration setting: [show_tab_notifications](https://conversejs.org/docs/html/configuration.html#show-tab-notifications)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
|
|
@ -1833,6 +1833,14 @@ Adds a button to the chat which can be clicked or tapped in order to send the
|
|||
message.
|
||||
|
||||
|
||||
show_tab_notifications
|
||||
----------------------
|
||||
|
||||
* Default: ``true``
|
||||
|
||||
Determines whether an unread messages counter is shown in the tab.
|
||||
|
||||
|
||||
singleton
|
||||
---------
|
||||
|
||||
|
@ -1961,13 +1969,6 @@ Converse render the emojis with `Twemoji <https://twemoji.twitter.com/>`_.
|
|||
See also `emoji_image_path`_.
|
||||
|
||||
|
||||
update_title
|
||||
------------
|
||||
* Default: ``true``
|
||||
|
||||
Determines whether to shows unread messages counter in the page title.
|
||||
|
||||
|
||||
visible_toolbar_buttons
|
||||
-----------------------
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ describe("Notifications", function () {
|
|||
|
||||
it("is incremented when the message is received and the window is not focused",
|
||||
mock.initConverse(
|
||||
['rosterGroupsFetched'], {'update_title': false},
|
||||
['rosterGroupsFetched'], {'show_tab_notifications': false},
|
||||
async function (done, _converse) {
|
||||
|
||||
await mock.waitForRoster(_converse, 'current');
|
||||
|
@ -255,7 +255,7 @@ describe("Notifications", function () {
|
|||
|
||||
expect(favico.badge.calls.count()).toBe(0);
|
||||
|
||||
_converse.api.settings.set('update_title', true);
|
||||
_converse.api.settings.set('show_tab_notifications', true);
|
||||
const msg2 = $msg({
|
||||
from: sender_jid,
|
||||
to: _converse.connection.jid,
|
||||
|
|
|
@ -17,7 +17,7 @@ converse.env.Favico = Favico;
|
|||
let favicon;
|
||||
|
||||
function updateUnreadFavicon () {
|
||||
if (api.settings.get('update_title')) {
|
||||
if (api.settings.get('show_tab_notifications')) {
|
||||
favicon = favicon ?? new converse.env.Favico({type: 'circle', animation: 'pop'});
|
||||
const chats = _converse.chatboxes.models;
|
||||
const num_unread = chats.reduce((acc, chat) => (acc + (chat.get('num_unread') || 0)), 0);
|
||||
|
@ -36,17 +36,17 @@ converse.plugins.add('converse-notification', {
|
|||
*/
|
||||
|
||||
api.settings.extend({
|
||||
update_title: true,
|
||||
notify_all_room_messages: false,
|
||||
show_desktop_notifications: true,
|
||||
show_chat_state_notifications: false,
|
||||
chatstate_notification_blacklist: [],
|
||||
// ^ a list of JIDs to ignore concerning chat state notifications
|
||||
play_sounds: true,
|
||||
sounds_path: api.settings.get("assets_path")+'/sounds/',
|
||||
notification_icon: 'logo/conversejs-filled.svg',
|
||||
chatstate_notification_blacklist: [],
|
||||
notification_delay: 5000,
|
||||
notify_nicknames_without_references: false
|
||||
notification_icon: 'logo/conversejs-filled.svg',
|
||||
notify_all_room_messages: false,
|
||||
notify_nicknames_without_references: false,
|
||||
play_sounds: true,
|
||||
show_chat_state_notifications: false,
|
||||
show_desktop_notifications: true,
|
||||
show_tab_notifications: true,
|
||||
sounds_path: api.settings.get("assets_path")+'/sounds/',
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user