mirror of https://github.com/procxx/kepka.git
fixed crashes on quit, fixed scrolled sticker icons
This commit is contained in:
parent
3aa2e592e0
commit
4b99eb9c8d
|
@ -1920,6 +1920,8 @@ namespace App {
|
||||||
}
|
}
|
||||||
|
|
||||||
void historyClearMsgs() {
|
void historyClearMsgs() {
|
||||||
|
::repliesTo.clear();
|
||||||
|
|
||||||
QVector<HistoryItem*> toDelete;
|
QVector<HistoryItem*> toDelete;
|
||||||
for (MsgsData::const_iterator i = msgsData.cbegin(), e = msgsData.cend(); i != e; ++i) {
|
for (MsgsData::const_iterator i = msgsData.cbegin(), e = msgsData.cend(); i != e; ++i) {
|
||||||
if ((*i)->detached()) {
|
if ((*i)->detached()) {
|
||||||
|
@ -1945,7 +1947,6 @@ namespace App {
|
||||||
}
|
}
|
||||||
|
|
||||||
void historyClearItems() {
|
void historyClearItems() {
|
||||||
historyClearMsgs();
|
|
||||||
randomData.clear();
|
randomData.clear();
|
||||||
sentData.clear();
|
sentData.clear();
|
||||||
mutedPeers.clear();
|
mutedPeers.clear();
|
||||||
|
@ -1991,7 +1992,6 @@ namespace App {
|
||||||
::webPageItems.clear();
|
::webPageItems.clear();
|
||||||
::sharedContactItems.clear();
|
::sharedContactItems.clear();
|
||||||
::gifItems.clear();
|
::gifItems.clear();
|
||||||
::repliesTo.clear();
|
|
||||||
lastPhotos.clear();
|
lastPhotos.clear();
|
||||||
lastPhotosMap.clear();
|
lastPhotosMap.clear();
|
||||||
::self = 0;
|
::self = 0;
|
||||||
|
|
|
@ -2694,6 +2694,7 @@ void EmojiPan::updateSelected() {
|
||||||
if (y >= _iconsTop && y < _iconsTop + st::rbEmoji.height && x >= 0 && x < 7 * st::rbEmoji.width && x < _icons.size() * st::rbEmoji.width) {
|
if (y >= _iconsTop && y < _iconsTop + st::rbEmoji.height && x >= 0 && x < 7 * st::rbEmoji.width && x < _icons.size() * st::rbEmoji.width) {
|
||||||
int32 skip = 0;
|
int32 skip = 0;
|
||||||
for (int32 i = 0, l = _icons.size(); i < l; ++i) {
|
for (int32 i = 0, l = _icons.size(); i < l; ++i) {
|
||||||
|
if (_icons.at(i).sticker) break;
|
||||||
if (x < st::rbEmoji.width) {
|
if (x < st::rbEmoji.width) {
|
||||||
newOver = i;
|
newOver = i;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2290,7 +2290,7 @@ void History::setUnreadCount(int32 newUnreadCount, bool psUpdate) {
|
||||||
App::histories().unreadFull += newUnreadCount - unreadCount;
|
App::histories().unreadFull += newUnreadCount - unreadCount;
|
||||||
if (mute) App::histories().unreadMuted += newUnreadCount - unreadCount;
|
if (mute) App::histories().unreadMuted += newUnreadCount - unreadCount;
|
||||||
unreadCount = newUnreadCount;
|
unreadCount = newUnreadCount;
|
||||||
if (psUpdate && (!mute || cIncludeMuted())) App::wnd()->updateCounter();
|
if (psUpdate && (!mute || cIncludeMuted()) && App::wnd()) App::wnd()->updateCounter();
|
||||||
if (unreadBar) {
|
if (unreadBar) {
|
||||||
int32 count = unreadCount;
|
int32 count = unreadCount;
|
||||||
if (peer->migrateTo()) {
|
if (peer->migrateTo()) {
|
||||||
|
|
|
@ -52,7 +52,6 @@ public:
|
||||||
void clear();
|
void clear();
|
||||||
void remove(const PeerId &peer);
|
void remove(const PeerId &peer);
|
||||||
~Histories() {
|
~Histories() {
|
||||||
clear();
|
|
||||||
unreadFull = unreadMuted = 0;
|
unreadFull = unreadMuted = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue