mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +00:00
fixed crash in notifyShowNext(), not always enum pinned icons
This commit is contained in:
@@ -2219,8 +2219,10 @@ void RegisterCustomScheme() {
|
|||||||
|
|
||||||
void psNewVersion() {
|
void psNewVersion() {
|
||||||
RegisterCustomScheme();
|
RegisterCustomScheme();
|
||||||
|
if (Local::oldSettingsVersion() < 8050) {
|
||||||
CheckPinnedAppUserModelId();
|
CheckPinnedAppUserModelId();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void psExecUpdater() {
|
void psExecUpdater() {
|
||||||
QString targs = qsl("-update");
|
QString targs = qsl("-update");
|
||||||
|
@@ -1165,7 +1165,16 @@ void SettingsInner::onAskQuestionSure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SettingsInner::onTelegramFAQ() {
|
void SettingsInner::onTelegramFAQ() {
|
||||||
QDesktopServices::openUrl(qsl("https://telegram.org/faq#general"));
|
QString url = qsl("https://telegram.org/faq");
|
||||||
|
if (cLang() > languageDefault && cLang() < languageCount) {
|
||||||
|
const char *code = LanguageCodes[cLang()];
|
||||||
|
if (qstr("de") == code || qstr("es") == code || qstr("it") == code || qstr("ko") == code) {
|
||||||
|
url += qsl("/") + code;
|
||||||
|
} else if (qstr("pt_BR") == code) {
|
||||||
|
url += qsl("/br");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsInner::chooseCustomLang() {
|
void SettingsInner::chooseCustomLang() {
|
||||||
|
@@ -1467,8 +1467,8 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
|||||||
uint64 ms = getms(true);
|
uint64 ms = getms(true);
|
||||||
History *history = notifyItem->history();
|
History *history = notifyItem->history();
|
||||||
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
NotifyWhenMaps::iterator j = notifyWhenMaps.find(history);
|
||||||
|
bool notifyWhenFound = (j != notifyWhenMaps.cend());
|
||||||
if (j == notifyWhenMaps.end()) {
|
if (!notifyWhenFound) {
|
||||||
history->clearNotifications();
|
history->clearNotifications();
|
||||||
} else {
|
} else {
|
||||||
HistoryItem *nextNotify = 0;
|
HistoryItem *nextNotify = 0;
|
||||||
@@ -1516,7 +1516,7 @@ void Window::notifyShowNext(NotifyWindow *remove) {
|
|||||||
|
|
||||||
if (!history->hasNotification()) {
|
if (!history->hasNotification()) {
|
||||||
if (notifyWaiter != notifyWaiters.cend()) notifyWaiters.erase(notifyWaiter);
|
if (notifyWaiter != notifyWaiters.cend()) notifyWaiters.erase(notifyWaiter);
|
||||||
if (j != notifyWhenMaps.cend()) notifyWhenMaps.erase(j);
|
if (notifyWhenFound) notifyWhenMaps.erase(j);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user