Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/Interface/Tabs/PluginList.as
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ class PluginListTab : Tab

void StartRequest()
{
Clear();
StartRequestForPage(0);
if (m_pageCount == 0) {
StartRequestForPage(0);
}
}
Comment on lines 57 to 62
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional logic should probably come from CheckStartRequest, not StartRequest. Additionally, only doing this when the page count is 0 feels wrong - why specifically that?


void StartRequestForPage(int page)
Expand Down Expand Up @@ -170,6 +171,11 @@ class PluginListTab : Tab
return;
}

if (UI::Button(Icons::Repeat + " Refresh")) {
Clear();
StartRequestForPage(0);
}

Comment on lines +174 to +178
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a very good looking button. We should probably make this look a bit more interesting - maybe it could be displayed as a (smaller) button in the top right corner.

if (Setting_ViewStyle == ViewStyle::Rows) {
if (UI::BeginTable("Plugins", 3, UI::TableFlags::RowBg)) {
UI::TableSetupColumn("##Image", UI::TableColumnFlags::WidthFixed, 95 * UI::GetScale());
Expand All @@ -193,6 +199,12 @@ class PluginListTab : Tab
}
}

if (m_request !is null && !m_request.Finished() && m_pageCount > 0) {
UI::PushFont(g_fontBold);
UI::Text("\\$7f7Loading more items...\\$z");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the \$z here. We may also not want this to be green, but just a gray instead - we can use UI::TextDisabled for. I also don't think this needs to be bold.

UI::PopFont();
}

// Handle automatic page loading
bool haveMorePages = m_page + 1 < m_pageCount;
bool waitedLongEnough = m_lastPageRequestFinished + 500 < Time::Now;
Expand Down