mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: crash in server read
This commit is contained in:
parent
084967354b
commit
a98e92639c
4 changed files with 13 additions and 9 deletions
|
@ -18,7 +18,7 @@
|
||||||
namespace AyuUi
|
namespace AyuUi
|
||||||
{
|
{
|
||||||
|
|
||||||
ConfirmationBox::ConfirmationBox(
|
ServerReadConfirmationBox::ServerReadConfirmationBox(
|
||||||
QWidget *,
|
QWidget *,
|
||||||
not_null<Window::SessionController *> controller)
|
not_null<Window::SessionController *> controller)
|
||||||
: _controller(controller)
|
: _controller(controller)
|
||||||
|
@ -26,7 +26,7 @@ ConfirmationBox::ConfirmationBox(
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmationBox::prepare()
|
void ServerReadConfirmationBox::prepare()
|
||||||
{
|
{
|
||||||
_text.create(this, tr::ayu_ReadConfirmationBoxQuestion(), st::boxLabel);
|
_text.create(this, tr::ayu_ReadConfirmationBoxQuestion(), st::boxLabel);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ void ConfirmationBox::prepare()
|
||||||
{ closeBox(); });
|
{ closeBox(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmationBox::resizeEvent(QResizeEvent *e)
|
void ServerReadConfirmationBox::resizeEvent(QResizeEvent *e)
|
||||||
{
|
{
|
||||||
BoxContent::resizeEvent(e);
|
BoxContent::resizeEvent(e);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ void ConfirmationBox::resizeEvent(QResizeEvent *e)
|
||||||
_text->moveToLeft(padding.left(), padding.top());
|
_text->moveToLeft(padding.left(), padding.top());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmationBox::ReadAllPeers()
|
void ServerReadConfirmationBox::ReadAllPeers()
|
||||||
{
|
{
|
||||||
auto settings = &AyuSettings::getInstance();
|
auto settings = &AyuSettings::getInstance();
|
||||||
auto prev = settings->sendReadMessages;
|
auto prev = settings->sendReadMessages;
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
namespace AyuUi
|
namespace AyuUi
|
||||||
{
|
{
|
||||||
|
|
||||||
class ConfirmationBox : public Ui::BoxContent
|
class ServerReadConfirmationBox : public Ui::BoxContent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConfirmationBox(QWidget *, not_null<Window::SessionController *> controller);
|
ServerReadConfirmationBox(QWidget *, not_null<Window::SessionController *> controller);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void prepare() override;
|
void prepare() override;
|
||||||
|
|
|
@ -623,8 +623,12 @@ void Histories::sendReadRequest(not_null<History*> history, State &state) {
|
||||||
DEBUG_LOG(("Reading: sending request invoked with till %1."
|
DEBUG_LOG(("Reading: sending request invoked with till %1."
|
||||||
).arg(tillId.bare));
|
).arg(tillId.bare));
|
||||||
const auto finished = [=] {
|
const auto finished = [=] {
|
||||||
const auto state = lookup(history);
|
auto state = lookup(history);
|
||||||
Assert(state != nullptr);
|
// Assert(state != nullptr);
|
||||||
|
if (state == nullptr) {
|
||||||
|
// don’t care + didn’t ask + cry about it + who asked + stay mad + get real + L + bleed + mald seethe cope harder + dilate + incorrect + hoes mad + pound sand + basic skill issue + typo + ratio + ur dad left + you fell off + no u + the audacity + triggered + repelled + ur a minor + k. + any askers + get a life + ok and? + cringe + copium + go outside + touch grass + kick rocks + quote tweet + think again + not based + not funny didn’t laugh + social credits -999, 999, 999, 999 + get good + reported + ad hominem + ok boomer + small pp + ur allergic to sunlight + GG! + get rekt + trolled + your loss + muted + banned + kicked + permaban + useless + i slept with ur mom + yo momma + yo momma so fat + redpilled + no bitches allowed + i said it better + tiktok fan + get a life + unsubscribed + plundered + go tell reddit + donowalled + simp + get sticked bug LOL + talk nonsense + trump supporter + your’re a full time discord mod + you’re* + grammar issue + nerd + get clapped + kys + lorem ipsum dolor sit amet + go outside + bleach + lol + gay + retard + autistic + reported + ask deez + ez clap + straight cash + idgaf + ratio again + stay mad + read FAQ + youre lost + you “re” + stay pressed + reverse double take back + pedophile + cancelled + done for + don't give a damn + get a job + sus + baka + sussy baka + get blocked + mad free + freer than air + furry + rip bozo + you're a (insert stereotype) + slight_smile + aired + cringe again + Super Idol的笑容 + mad cuz bad + my pronouns are xe, xem & xyr + irrelevant + deal with it + screencapped your bio + karen/kyle + jealous + you're deaf + balls + i'll be right back + go ahead whine about it + not straight + eat paper + you lose + count to three + your problem + no one cares + log off + don't care even more + sex offender + sex defender + get religion + not okay + glhf + NFT owner + you make bad memes + problematic + fall in line + dog water + you look like a wall + you don’t know 2 + 2 with yo head ass + you are going to my cringe compilation + you can’t count to five + try again + you failed kindergarten + rickrolled + no lifer + guten freunden schickt man einen deutschen panzer + you have a anime profile picture + an* + fatherless + motherless + sisterless + brotherless + orphan + you can't catch this ratio + catch some bitches + I don't care about your opinion + genshin player + you dress like garbage + 日本語がお上手ですね + get fucked + you can’t understand what the word intelligence means with your dumb ass + you have hair + queued + put some thought into what you're going to do with that + stfu + go to bed + yes, i'm taller than you + i think your joke is funny + i rejected your mother's advances + marooned + you can’t read + I win + final ratio
|
||||||
|
state = &_states[history];
|
||||||
|
}
|
||||||
|
|
||||||
if (state->sentReadTill == tillId) {
|
if (state->sentReadTill == tillId) {
|
||||||
state->sentReadDone = true;
|
state->sentReadDone = true;
|
||||||
|
|
|
@ -982,7 +982,7 @@ void MainMenu::setupMenu() {
|
||||||
{&st::ayuSReadMenuIcon}
|
{&st::ayuSReadMenuIcon}
|
||||||
)->setClickedCallback([=]
|
)->setClickedCallback([=]
|
||||||
{
|
{
|
||||||
auto box = Box<AyuUi::ConfirmationBox>(controller);
|
auto box = Box<AyuUi::ServerReadConfirmationBox>(controller);
|
||||||
Ui::show(std::move(box));
|
Ui::show(std::move(box));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue