-
Notifications
You must be signed in to change notification settings - Fork 9
PluginList: Dont clear every time the tab is opened #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,8 +56,9 @@ class PluginListTab : Tab | |
|
|
||
| void StartRequest() | ||
| { | ||
| Clear(); | ||
| StartRequestForPage(0); | ||
| if (m_pageCount == 0) { | ||
| StartRequestForPage(0); | ||
| } | ||
| } | ||
|
|
||
| void StartRequestForPage(int page) | ||
|
|
@@ -170,6 +171,11 @@ class PluginListTab : Tab | |
| return; | ||
| } | ||
|
|
||
| if (UI::Button(Icons::Repeat + " Refresh")) { | ||
| Clear(); | ||
| StartRequestForPage(0); | ||
| } | ||
|
|
||
|
Comment on lines
+174
to
+178
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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()); | ||
|
|
@@ -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"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for the |
||
| UI::PopFont(); | ||
| } | ||
|
|
||
| // Handle automatic page loading | ||
| bool haveMorePages = m_page + 1 < m_pageCount; | ||
| bool waitedLongEnough = m_lastPageRequestFinished + 500 < Time::Now; | ||
|
|
||
There was a problem hiding this comment.
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, notStartRequest. Additionally, only doing this when the page count is 0 feels wrong - why specifically that?