-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Store the Response from the API as a File / Added reload button #22
Store the Response from the API as a File / Added reload button #22
Conversation
I think you haven't added the part where the browser will load from the file. Or did I miss something? Could you also put a screenshot of the new UI/dialog, when you made UI changes? I usually use Flameshot to take a screenshot (or any tool is fine) |
|
qgis_hub_plugin/core/api_client.py
Outdated
return response.json() | ||
|
||
|
||
def reload_resources(): |
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.
I think we don't need this function, since it only has one statement. It's better to call get_all_resources
with force_update
set to true
directly.
@@ -63,6 +65,15 @@ def populate_resources(self): | |||
item = ResourceItem(resource) | |||
self.resource_model.appendRow(item) | |||
|
|||
def reload_resources(self): |
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.
It's better to merge this function with populate_resources
and add a force_update
parameter on the function (default to false
). And connect the reloadPushButton
with force_update
to true
@ronitjadhav could you also update the button? Put a label under the Resource Type and the button next to it. To make them look tidy. I think it's good to have a tool button instead a push button. You can use reload icon that is included on QGIS. |
@ismailsunni
|
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.
Thanks, Ronit, LGTM now.
There are some small tidy up that we can add later. I will create another ticket for it.
#12