mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Added lottie icon when have no enough info for earn stats.
This commit is contained in:
parent
0d8ae7bb37
commit
7b0a156bba
2 changed files with 14 additions and 1 deletions
|
@ -16,7 +16,10 @@ namespace Data {
|
|||
|
||||
struct CreditsEarnStatistics final {
|
||||
explicit operator bool() const {
|
||||
return !!usdRate;
|
||||
return usdRate
|
||||
&& currentBalance
|
||||
&& availableBalance
|
||||
&& overallRevenue;
|
||||
}
|
||||
Data::StatisticalGraph revenueGraph;
|
||||
StarsAmount currentBalance;
|
||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_web_page.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/stickers/data_custom_emoji.h"
|
||||
#include "dialogs/ui/chat_search_empty.h"
|
||||
#include "history/view/controls/history_view_webpage_processor.h"
|
||||
#include "info/bot/starref/info_bot_starref_join_widget.h"
|
||||
#include "info/bot/starref/info_bot_starref_setup_widget.h"
|
||||
|
@ -342,6 +343,15 @@ void InnerWidget::load() {
|
|||
|
||||
void InnerWidget::fill() {
|
||||
const auto container = this;
|
||||
if (!_state.currencyEarn && !_state.creditsEarn) {
|
||||
const auto empty = container->add(object_ptr<Dialogs::SearchEmpty>(
|
||||
container,
|
||||
Dialogs::SearchEmptyIcon::NoResults,
|
||||
tr::lng_search_tab_no_results(Ui::Text::Bold)));
|
||||
empty->setMinimalHeight(st::changePhoneIconSize);
|
||||
empty->animate();
|
||||
return;
|
||||
}
|
||||
const auto bot = (peerIsUser(_peer->id) && _peer->asUser()->botInfo)
|
||||
? _peer->asUser()
|
||||
: nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue