Fix returning to the same chat from inner one

New icons
This commit is contained in:
Eduard Kuzmenko 2021-04-14 04:32:58 +04:00
parent 92fa0cf287
commit 357eb1a9c1
8 changed files with 869 additions and 769 deletions

View File

@ -5,7 +5,6 @@
*/
import PopupElement, { PopupOptions } from ".";
import { getFullDate } from "../../helpers/date";
import mediaSizes from "../../helpers/mediaSizes";
import I18n, { i18n, LangPackKey } from "../../lib/langPack";
import InputField from "../inputField";

View File

@ -101,7 +101,7 @@ export class AppSidebarLeft extends SidebarSlider {
};
const menuButtons: (ButtonMenuItemOptions & {verify?: () => boolean})[] = [{
icon: 'savedmessages',
icon: 'saved',
text: 'SavedMessages',
onClick: () => {
setTimeout(() => { // menu doesn't close if no timeout (lol)
@ -119,7 +119,7 @@ export class AppSidebarLeft extends SidebarSlider {
new AppSettingsTab(this).open();
}
}, {
icon: 'colorize',
icon: 'darkmode',
text: 'DarkMode',
onClick: () => {
@ -129,7 +129,7 @@ export class AppSidebarLeft extends SidebarSlider {
stateKey: 'settings.nightTheme',
})
}, {
icon: 'lamp',
icon: 'animations',
text: 'Animations',
onClick: () => {
@ -146,7 +146,7 @@ export class AppSidebarLeft extends SidebarSlider {
appImManager.openUsername('TelegramTips');
}
}, {
icon: 'help',
icon: 'bug',
text: 'ReportBug',
onClick: () => {
const a = document.createElement('a');

View File

@ -715,13 +715,19 @@ export class AppImManager {
this.createNewChat();
this.chats.splice(0, 1); */
const spliced = this.chats.splice(1, this.chats.length - 1);
const ret = this.setPeer(peerId, lastMsgId);
this.spliceChats(0, false, false, spliced);
if(this.chat.peerId === peerId) {
this.spliceChats(0, true, true, spliced);
return;
} else {
const ret = this.setPeer(peerId, lastMsgId);
this.spliceChats(0, false, false, spliced);
return ret;
}
// } else {
// this.spliceChats(1, false, animate);
// }
return ret;
//return ret;
}
// * don't reset peer if returning

View File

@ -556,7 +556,7 @@ export class AppProfileManager {
if(peerId === myId && isDialog) {
div.innerHTML = '';
div.dataset.color = '';
div.classList.add('tgico-savedmessages');
div.classList.add('tgico-saved');
div.classList.remove('tgico-avatar_deletedaccount');
return;
}
@ -567,7 +567,7 @@ export class AppProfileManager {
div.innerHTML = '';
div.dataset.color = appPeersManager.getPeerColorById(peerId);
div.classList.add('tgico-avatar_deletedaccount');
div.classList.remove('tgico-savedmessages');
div.classList.remove('tgico-saved');
return;
}
}
@ -579,7 +579,7 @@ export class AppProfileManager {
}
div.innerHTML = '';
div.classList.remove('tgico-savedmessages', 'tgico-avatar_deletedaccount');
div.classList.remove('tgico-saved', 'tgico-avatar_deletedaccount');
div.dataset.color = color;
let abbr: string;

View File

@ -65,6 +65,10 @@ avatar-element {
font-size: calc(36px / var(--multiplier));
}
&.tgico-saved:before {
font-size: calc(21px / var(--multiplier)) !important; // ! IMPORTANT IS TEMPORARY
}
&.tgico-savedmessages:before {
font-size: calc(25px / var(--multiplier));
}

File diff suppressed because it is too large Load Diff

View File

@ -19,145 +19,158 @@ $tgico-font-path: "assets/fonts" !default;
.replace(/\.(.+?):before\{content:"(.+?);\}/g, `$$$1: "\\$2;\n`);
*/
$tgico-zoomout: "\e900";
$tgico-username: "\e901";
$tgico-zoomin: "\e902";
$tgico-up: "\e903";
$tgico-user: "\e904";
$tgico-unmute: "\e905";
$tgico-unpin: "\e906";
$tgico-unread: "\e907";
$tgico-unlock: "\e908";
$tgico-unarchive: "\e909";
$tgico-underline: "\e90a";
$tgico-textedit: "\e90b";
$tgico-tip: "\e90c";
$tgico-stop: "\e90d";
$tgico-strikethrough: "\e90e";
$tgico-smile: "\e90f";
$tgico-sport: "\e910";
$tgico-stickers: "\e911";
$tgico-settings: "\e912";
$tgico-smallscreen: "\e913";
$tgico-sendingerror: "\e914";
$tgico-send: "\e915";
$tgico-sending: "\e916";
$tgico-select: "\e917";
$tgico-send2: "\e918";
$tgico-scheduled: "\e919";
$tgico-search: "\e91a";
$tgico-revote: "\e91b";
$tgico-savedmessages: "\e91c";
$tgico-schedule: "\e91d";
$tgico-replace: "\e91e";
$tgico-reply: "\e91f";
$tgico-radioon: "\e920";
$tgico-readchats: "\e921";
$tgico-recent: "\e922";
$tgico-radiooff: "\e923";
$tgico-poll: "\e924";
$tgico-previous: "\e925";
$tgico-pinned_filled: "\e926";
$tgico-pinnedchat: "\e927";
$tgico-play: "\e928";
$tgico-photo: "\e929";
$tgico-pin: "\e92a";
$tgico-pinlist: "\e92b";
$tgico-permissions: "\e92c";
$tgico-phone: "\e92d";
$tgico-pause: "\e92e";
$tgico-noncontacts: "\e92f";
$tgico-nosound: "\e930";
$tgico-passwordoff: "\e931";
$tgico-newprivate: "\e932";
$tgico-next: "\e933";
$tgico-newchat_filled: "\e934";
$tgico-newgroup: "\e935";
$tgico-muted: "\e936";
$tgico-newchannel: "\e937";
$tgico-more: "\e938";
$tgico-mute: "\e939";
$tgico-microphone: "\e93a";
$tgico-minus: "\e93b";
$tgico-monospace: "\e93c";
$tgico-message: "\e93d";
$tgico-microphone2: "\e93e";
$tgico-logout: "\e93f";
$tgico-mention: "\e940";
$tgico-menu: "\e941";
$tgico-loginlogomobile: "\e942";
$tgico-lock: "\e943";
$tgico-loginlogodesktop: "\e944";
$tgico-livelocation: "\e945";
$tgico-location: "\e946";
$tgico-link: "\e947";
$tgico-language: "\e948";
$tgico-largepause: "\e949";
$tgico-largeplay: "\e94a";
$tgico-lamp: "\e94b";
$tgico-keyboard: "\e94c";
$tgico-info: "\e94d";
$tgico-italic: "\e94e";
$tgico-group: "\e94f";
$tgico-help: "\e950";
$tgico-info2: "\e951";
$tgico-forward: "\e952";
$tgico-gifs: "\e953";
$tgico-flag: "\e954";
$tgico-folder: "\e955";
$tgico-eye1: "\e956";
$tgico-eye2: "\e957";
$tgico-favourites: "\e958";
$tgico-edit: "\e959";
$tgico-email: "\e95a";
$tgico-eats: "\e95b";
$tgico-dragmedia: "\e95c";
$tgico-down: "\e95d";
$tgico-download: "\e95e";
$tgico-dragfiles: "\e95f";
$tgico-deleteuser: "\e960";
$tgico-document: "\e961";
$tgico-delete_filled: "\e962";
$tgico-delete: "\e963";
$tgico-deleteleft: "\e964";
$tgico-copy: "\e965";
$tgico-data: "\e966";
$tgico-commentssticker: "\e967";
$tgico-clouddownload: "\e968";
$tgico-colorize: "\e969";
$tgico-comments: "\e96a";
$tgico-checkboxon: "\e96b";
$tgico-close: "\e96c";
$tgico-checkbox: "\e96d";
$tgico-checkboxblock: "\e96e";
$tgico-checkboxempty: "\e96f";
$tgico-chatsplaceholder: "\e970";
$tgico-check: "\e971";
$tgico-channel: "\e972";
$tgico-channelviews: "\e973";
$tgico-chatspinned: "\e974";
$tgico-cameraadd: "\e975";
$tgico-car: "\e976";
$tgico-camera: "\e977";
$tgico-bots: "\e978";
$tgico-calendar: "\e979";
$tgico-calendarfilter: "\e97a";
$tgico-botcom: "\e97b";
$tgico-avatar_deletedaccount: "\e97c";
$tgico-avatar_savedmessages: "\e97d";
$tgico-bold: "\e97e";
$tgico-attach: "\e97f";
$tgico-avatar_archivedchats: "\e980";
$tgico-arrow_next: "\e981";
$tgico-arrow_back: "\e982";
$tgico-arrow_down: "\e983";
$tgico-animals: "\e984";
$tgico-archive: "\e985";
$tgico-adduser: "\e986";
$tgico-admin: "\e987";
$tgico-addmember_filled: "\e988";
$tgico-activesessions: "\e989";
$tgico-add: "\e98a";
$tgico-fullscreen: "\e98b";
$tgico-check_svg1: "\e98c";
$tgico-checks: "\e98d";
$tgico-check: "\e900";
$tgico-checks: "\e901";
$tgico-activesessions: "\e902";
$tgico-add: "\e903";
$tgico-addmember_filled: "\e904";
$tgico-adduser: "\e905";
$tgico-admin: "\e906";
$tgico-animals: "\e907";
$tgico-animations: "\e908";
$tgico-archive: "\e909";
$tgico-arrow_back: "\e90a";
$tgico-arrow_down: "\e90b";
$tgico-arrow_next: "\e90c";
$tgico-attach: "\e90d";
$tgico-bold: "\e90e";
$tgico-botcom: "\e90f";
$tgico-bots: "\e910";
$tgico-bug: "\e911";
$tgico-calendar: "\e912";
$tgico-calendarfilter: "\e913";
$tgico-camera: "\e914";
$tgico-cameraadd: "\e915";
$tgico-car: "\e916";
$tgico-channel: "\e917";
$tgico-channelviews: "\e918";
$tgico-chatspinned: "\e919";
$tgico-chatsplaceholder: "\e91a";
$tgico-check1: "\e91b";
$tgico-checkbox: "\e91c";
$tgico-checkboxblock: "\e91d";
$tgico-checkboxempty: "\e91e";
$tgico-checkboxon: "\e91f";
$tgico-checkretract: "\e920";
$tgico-checkround: "\e921";
$tgico-close: "\e922";
$tgico-clouddownload: "\e923";
$tgico-colorize: "\e924";
$tgico-comments: "\e925";
$tgico-commentssticker: "\e926";
$tgico-copy: "\e927";
$tgico-darkmode: "\e928";
$tgico-data: "\e929";
$tgico-delete: "\e92a";
$tgico-delete_filled: "\e92b";
$tgico-deleteleft: "\e92c";
$tgico-deleteuser: "\e92d";
$tgico-devices: "\e92e";
$tgico-document: "\e92f";
$tgico-down: "\e930";
$tgico-download: "\e931";
$tgico-dragfiles: "\e932";
$tgico-dragmedia: "\e933";
$tgico-eats: "\e934";
$tgico-edit: "\e935";
$tgico-email: "\e936";
$tgico-enter: "\e937";
$tgico-eye1: "\e938";
$tgico-eye2: "\e939";
$tgico-favourites: "\e93a";
$tgico-flag: "\e93b";
$tgico-folder: "\e93c";
$tgico-fontsize: "\e93d";
$tgico-forward: "\e93e";
$tgico-fullscreen: "\e93f";
$tgico-gifs: "\e940";
$tgico-group: "\e941";
$tgico-help: "\e942";
$tgico-image: "\e943";
$tgico-info: "\e944";
$tgico-info2: "\e945";
$tgico-italic: "\e946";
$tgico-keyboard: "\e947";
$tgico-lamp: "\e948";
$tgico-language: "\e949";
$tgico-largepause: "\e94a";
$tgico-largeplay: "\e94b";
$tgico-left: "\e94c";
$tgico-link: "\e94d";
$tgico-livelocation: "\e94e";
$tgico-location: "\e94f";
$tgico-lock: "\e950";
$tgico-loginlogodesktop: "\e951";
$tgico-loginlogomobile: "\e952";
$tgico-logout: "\e953";
$tgico-mention: "\e954";
$tgico-menu: "\e955";
$tgico-message: "\e956";
$tgico-messageunread: "\e957";
$tgico-microphone: "\e958";
$tgico-microphone2: "\e959";
$tgico-minus: "\e95a";
$tgico-monospace: "\e95b";
$tgico-more: "\e95c";
$tgico-mute: "\e95d";
$tgico-muted: "\e95e";
$tgico-newchannel: "\e95f";
$tgico-newchat_filled: "\e960";
$tgico-newgroup: "\e961";
$tgico-newprivate: "\e962";
$tgico-next: "\e963";
$tgico-noncontacts: "\e964";
$tgico-nosound: "\e965";
$tgico-notificationsoff: "\e966";
$tgico-notificationson: "\e967";
$tgico-passwordoff: "\e968";
$tgico-pause: "\e969";
$tgico-permissions: "\e96a";
$tgico-phone: "\e96b";
$tgico-photo: "\e96c";
$tgico-pin: "\e96d";
$tgico-pinlist: "\e96e";
$tgico-pinned_filled: "\e96f";
$tgico-pinnedchat: "\e970";
$tgico-play: "\e971";
$tgico-plus: "\e972";
$tgico-poll: "\e973";
$tgico-previous: "\e974";
$tgico-radiooff: "\e975";
$tgico-radioon: "\e976";
$tgico-readchats: "\e977";
$tgico-recent: "\e978";
$tgico-replace: "\e979";
$tgico-reply: "\e97a";
$tgico-revote: "\e97b";
$tgico-saved: "\e97c";
$tgico-savedmessages: "\e97d";
$tgico-schedule: "\e97e";
$tgico-scheduled: "\e97f";
$tgico-search: "\e980";
$tgico-select: "\e981";
$tgico-send: "\e982";
$tgico-send2: "\e983";
$tgico-sending: "\e984";
$tgico-sendingerror: "\e985";
$tgico-settings: "\e986";
$tgico-smallscreen: "\e987";
$tgico-smile: "\e988";
$tgico-sport: "\e989";
$tgico-stickers: "\e98a";
$tgico-stop: "\e98b";
$tgico-strikethrough: "\e98c";
$tgico-textedit: "\e98d";
$tgico-tip: "\e98e";
$tgico-unarchive: "\e98f";
$tgico-underline: "\e990";
$tgico-unlock: "\e991";
$tgico-unmute: "\e992";
$tgico-unpin: "\e993";
$tgico-unread: "\e994";
$tgico-up: "\e995";
$tgico-user: "\e996";
$tgico-username: "\e997";
$tgico-write: "\e998";
$tgico-zoomin: "\e999";
$tgico-zoomout: "\e99a";

View File

@ -1128,3 +1128,16 @@ middle-ellipsis-element {
background: linear-gradient(180deg, rgba(0, 0, 0, .06) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, .06) 100%);
}
}
// ! TEMPORARY
.tgico-reply:before,
.tgico-attach:before,
.tgico-saved:before,
.tgico-phone:before,
.tgico-admin:before,
.tgico-message:before,
.tgico-fontsize:before,
.tgico-forward:before {
font-size: 20px !important;
padding: 0 2px;
}