Idea for contacts screen route

This commit is contained in:
the-djmaze 2024-02-11 03:43:44 +01:00
parent a25d35d6df
commit fc141fe29b
10 changed files with 197 additions and 9 deletions

View file

@ -0,0 +1,33 @@
import { ScopeContacts } from 'Common/Enums';
import { i18n } from 'Common/Translator';
import { AppUserStore } from 'Stores/User/App';
import { SystemDropDownUserView } from 'View/User/SystemDropDown';
import { AddressBooks } from 'View/User/Contacts/AddressBooks';
import { ContactsList } from 'View/User/Contacts/ContactsList';
import { ContactView } from 'View/User/Contacts/ContactView';
import { AbstractScreen } from 'Knoin/AbstractScreen';
export class ContactsUserScreen extends AbstractScreen {
constructor() {
super('contacts', [
SystemDropDownUserView,
AddressBooks,
ContactsList,
ContactView
]);
}
onShow() {
this.setTitle();
AppUserStore.focusedState('none');
AppUserStore.focusedState(ScopeContacts);
}
setTitle() {
rl.setTitle(i18n('GLOBAL/CONTACTS'));
}
}

View file

@ -39,7 +39,7 @@ export class MailBoxUserScreen extends AbstractScreen {
/**
* @returns {void}
*/
updateWindowTitle() {
setTitle() {
const count = Settings.app('listPermanentFiltered') ? 0 : FolderUserStore.foldersInboxUnreadCount(),
email = AccountUserStore.email();
@ -55,7 +55,7 @@ export class MailBoxUserScreen extends AbstractScreen {
* @returns {void}
*/
onShow() {
this.updateWindowTitle();
this.setTitle();
AppUserStore.focusedState('none');
AppUserStore.focusedState(ScopeMessageList);
}
@ -99,7 +99,7 @@ export class MailBoxUserScreen extends AbstractScreen {
email === item?.email && item?.count(e.detail)
);
*/
this.updateWindowTitle();
this.setTitle();
});
}

View file

@ -66,11 +66,11 @@ export class SettingsUserScreen extends AbstractSettingsScreen {
}
onShow() {
this.setSettingsTitle();
this.setTitle();
keyScope(ScopeSettings);
}
setSettingsTitle() {
setTitle() {
const sEmail = AccountUserStore.email();
rl.setTitle((sEmail ? sEmail + ' - ' : '') + this.sSettingsTitle);
}