mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Most of the new Settings are done.
Left: auto update, privacy and security, local storage box + some minor things, like design fixes, codes like loadlang and clearing of the local storage (box) and temp download folder.
This commit is contained in:
@@ -483,12 +483,12 @@ void MainWindow::psNotifyShown(NotifyWindow *w) {
|
||||
}
|
||||
|
||||
void MainWindow::psPlatformNotify(HistoryItem *item, int32 fwdCount) {
|
||||
QString title = (!App::passcoded() && cNotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->history()->peer->name : qsl("Telegram Desktop");
|
||||
QString subtitle = (!App::passcoded() && cNotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->notificationHeader() : QString();
|
||||
QPixmap pix = (!App::passcoded() && cNotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->history()->peer->genUserpic(st::notifyMacPhotoSize) : QPixmap();
|
||||
QString msg = (!App::passcoded() && cNotifyView() <= dbinvShowPreview && !Global::ScreenIsLocked()) ? (fwdCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, fwdCount)) : lang(lng_notification_preview);
|
||||
QString title = (!App::passcoded() && Global::NotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->history()->peer->name : qsl("Telegram Desktop");
|
||||
QString subtitle = (!App::passcoded() && Global::NotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->notificationHeader() : QString();
|
||||
QPixmap pix = (!App::passcoded() && Global::NotifyView() <= dbinvShowName && !Global::ScreenIsLocked()) ? item->history()->peer->genUserpic(st::notifyMacPhotoSize) : QPixmap();
|
||||
QString msg = (!App::passcoded() && Global::NotifyView() <= dbinvShowPreview && !Global::ScreenIsLocked()) ? (fwdCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, fwdCount)) : lang(lng_notification_preview);
|
||||
|
||||
bool withReply = !App::passcoded() && (cNotifyView() <= dbinvShowPreview && !Global::ScreenIsLocked()) && item->history()->peer->canWrite();
|
||||
bool withReply = !App::passcoded() && (Global::NotifyView() <= dbinvShowPreview && !Global::ScreenIsLocked()) && item->history()->peer->canWrite();
|
||||
|
||||
_private.showNotify(item->history()->peer->id, item->id, pix, title, subtitle, msg, withReply);
|
||||
}
|
||||
|
@@ -886,9 +886,9 @@ bool MainWindow::psHasNativeNotifications() {
|
||||
Q_DECLARE_METATYPE(QMargins);
|
||||
void MainWindow::psFirstShow() {
|
||||
if (Toasts::supported()) {
|
||||
cSetCustomNotifies(!cWindowsNotifications());
|
||||
Global::SetCustomNotifies(!Global::WindowsNotifications());
|
||||
} else {
|
||||
cSetCustomNotifies(true);
|
||||
Global::SetCustomNotifies(true);
|
||||
}
|
||||
|
||||
_psShadowWindows.init(_shActive);
|
||||
@@ -1088,10 +1088,10 @@ void MainWindow::psNotifyShown(NotifyWindow *w) {
|
||||
}
|
||||
|
||||
void MainWindow::psPlatformNotify(HistoryItem *item, int32 fwdCount) {
|
||||
QString title = (!App::passcoded() && cNotifyView() <= dbinvShowName) ? item->history()->peer->name : qsl("Telegram Desktop");
|
||||
QString subtitle = (!App::passcoded() && cNotifyView() <= dbinvShowName) ? item->notificationHeader() : QString();
|
||||
bool showpix = (!App::passcoded() && cNotifyView() <= dbinvShowName);
|
||||
QString msg = (!App::passcoded() && cNotifyView() <= dbinvShowPreview) ? (fwdCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, fwdCount)) : lang(lng_notification_preview);
|
||||
QString title = (!App::passcoded() && Global::NotifyView() <= dbinvShowName) ? item->history()->peer->name : qsl("Telegram Desktop");
|
||||
QString subtitle = (!App::passcoded() && Global::NotifyView() <= dbinvShowName) ? item->notificationHeader() : QString();
|
||||
bool showpix = (!App::passcoded() && Global::NotifyView() <= dbinvShowName);
|
||||
QString msg = (!App::passcoded() && Global::NotifyView() <= dbinvShowPreview) ? (fwdCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, fwdCount)) : lang(lng_notification_preview);
|
||||
|
||||
Toasts::create(item->history()->peer, item->id, showpix, title, subtitle, msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user