mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 {
|
struct CreditsEarnStatistics final {
|
||||||
explicit operator bool() const {
|
explicit operator bool() const {
|
||||||
return !!usdRate;
|
return usdRate
|
||||||
|
&& currentBalance
|
||||||
|
&& availableBalance
|
||||||
|
&& overallRevenue;
|
||||||
}
|
}
|
||||||
Data::StatisticalGraph revenueGraph;
|
Data::StatisticalGraph revenueGraph;
|
||||||
StarsAmount currentBalance;
|
StarsAmount currentBalance;
|
||||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_web_page.h"
|
#include "data/data_web_page.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/stickers/data_custom_emoji.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 "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_join_widget.h"
|
||||||
#include "info/bot/starref/info_bot_starref_setup_widget.h"
|
#include "info/bot/starref/info_bot_starref_setup_widget.h"
|
||||||
|
@ -342,6 +343,15 @@ void InnerWidget::load() {
|
||||||
|
|
||||||
void InnerWidget::fill() {
|
void InnerWidget::fill() {
|
||||||
const auto container = this;
|
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)
|
const auto bot = (peerIsUser(_peer->id) && _peer->asUser()->botInfo)
|
||||||
? _peer->asUser()
|
? _peer->asUser()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue