From 818956384327b416a79be012ce9cbd5fc5489bb6 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Wed, 25 Jan 2023 18:53:20 +0400 Subject: [PATCH] Fix sending photos Fix modifying global notification settings --- src/components/popups/newMedia.ts | 2 +- src/components/sidebarLeft/tabs/notifications.ts | 5 +++-- src/scss/partials/_button.scss | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/popups/newMedia.ts b/src/components/popups/newMedia.ts index 20978712b..81469542c 100644 --- a/src/components/popups/newMedia.ts +++ b/src/components/popups/newMedia.ts @@ -594,7 +594,7 @@ export default class PopupNewMedia extends PopupElement { } else { const img = new Image(); itemDiv.append(img); - const url = await apiManagerProxy.invoke('createObjectURL', file); + const url = params.objectURL = await apiManagerProxy.invoke('createObjectURL', file); await renderImageFromUrlPromise(img, url); const mimeType = params.file.type; diff --git a/src/components/sidebarLeft/tabs/notifications.ts b/src/components/sidebarLeft/tabs/notifications.ts index 50d416112..66e558fa7 100644 --- a/src/components/sidebarLeft/tabs/notifications.ts +++ b/src/components/sidebarLeft/tabs/notifications.ts @@ -6,7 +6,7 @@ import Row from '../../row'; import CheckboxField from '../../checkboxField'; -import {InputNotifyPeer, Update} from '../../../layer'; +import {InputNotifyPeer, InputPeerNotifySettings, Update} from '../../../layer'; import {SliderSuperTabEventable} from '../../sliderTab'; import rootScope from '../../../lib/rootScope'; import {LangPackKey} from '../../../lib/langPack'; @@ -71,10 +71,11 @@ export default class AppNotificationsTab extends SliderSuperTabEventable { return; } - const inputSettings: any = copy(notifySettings); + const inputSettings: InputPeerNotifySettings = copy(notifySettings) as any; inputSettings._ = 'inputPeerNotifySettings'; inputSettings.mute_until = mute ? MUTE_UNTIL : 0; inputSettings.show_previews = showPreviews; + delete inputSettings.flags; this.managers.appNotificationsManager.updateNotifySettings(inputNotifyPeer, inputSettings); }, {once: true}); diff --git a/src/scss/partials/_button.scss b/src/scss/partials/_button.scss index c33710c6d..a8c086b31 100644 --- a/src/scss/partials/_button.scss +++ b/src/scss/partials/_button.scss @@ -251,7 +251,7 @@ $btn-menu-z-index: 4; font-weight: 500; transform: scale(1); - .tgico-char { + &.tgico-char:before { width: var(--icon-size); }