Skip to content
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

[WIP] Automatic Update when opening app #404

Closed
wants to merge 1 commit into from

Conversation

luvkaggarwal
Copy link

The app is automatically updated when it starts. In case there is no internet, a message is shown informing that there is no net connection, so the previous list is being loaded.

This is in response to issue no #360

@@ -447,6 +448,7 @@ private ArticlesListFragment getFragment(int position) {
private void syncQueue() {
if(!WallabagConnection.isNetworkAvailable()) {
Toast.makeText(this, getString(R.string.txtNetOffline), Toast.LENGTH_SHORT).show();
Toast.makeText(this, getString(R.string.prevLoad), Toast.LENGTH_SHORT).show();
Copy link
Contributor

Choose a reason for hiding this comment

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

Does is it make sense to have two toasts in a row?

Copy link
Author

Choose a reason for hiding this comment

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

Well, it can be concatenated to form one. But if we remove the second one, it would seem as if it is a bug in the app if it always pop up during the start of the app

@Strubbl
Copy link
Contributor

Strubbl commented Jan 20, 2017

I do not want to have automatic update of article list on opening up the app due to high mobile traffice when loading the images. I would only accept it on WIFI only.

@luvkaggarwal
Copy link
Author

You see that can be moderated as a check if the device is connected to wifi or not.
But if there is no feature of auto - update, it just comes off as a big loophole in the design
Its like you opening an app like facebook and having to press a refresh button instead of the app doing the work for you

@@ -73,6 +73,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_articles_list);

settings = new Settings(this);
syncQueue();
Copy link
Member

@di72nn di72nn Jan 20, 2017

Choose a reason for hiding this comment

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

That's not what you think it is. It launches offline queue sync (the sync of the changes that were not synced to server when there were no data connection).

@di72nn
Copy link
Member

di72nn commented Jan 20, 2017

First of all, thanks for your contribution.

Here's my opinion regarding that feature:

  • The feature should be optional.
  • There should be an option to enable it only for unmetered networks (not critical).
  • The start logic should be more robust. The onCreate() method isn't suited for it. It probably should be onStart() with additional checks (a check for a certain timeout since last update).
  • Also I think that if there is no network, there should be no toast messages for automatic actions.

@luvkaggarwal
Copy link
Author

Thank you for your response.
I will look into it and try to implement your suggestions in the best way possible.

@tcitworld tcitworld changed the title Automatic Update when opening app [WIP] Automatic Update when opening app Feb 9, 2017
@di72nn
Copy link
Member

di72nn commented Feb 28, 2017

The feature was implemented in #370 (except for "only on Wi-Fi" part). Thanks for your work anyway.

@di72nn di72nn closed this Feb 28, 2017
@Strubbl
Copy link
Contributor

Strubbl commented Feb 28, 2017

@di72nn Is there a need for a new issue for the "only on Wi-Fi" part?

@di72nn
Copy link
Member

di72nn commented Feb 28, 2017

@Strubbl #346 may be updated.

@Strubbl
Copy link
Contributor

Strubbl commented Feb 28, 2017

oh, ok. forgot about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants