Skip to content

Commit

Permalink
Merge pull request #1446 from matkoniecz/delay_registration_call
Browse files Browse the repository at this point in the history
do not attack new user with request to register/login so early
  • Loading branch information
westnordost authored Jun 27, 2019
2 parents eda55e2 + 4e4d3f2 commit 41d2bad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ private void confirmUndo(final OsmQuest quest)
@UiThread private void requestOAuthorized()
{
if(dontShowRequestAuthorizationAgain) return;
if(answersCounter.waitingForUpload() <= 5) return;

View inner = LayoutInflater.from(this).inflate(
R.layout.dialog_authorize_now, null, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public void discardedOne()
updateTexts();
}

public Integer waitingForUpload(){
return unsynced;
}

@SuppressLint("StaticFieldLeak") public void update()
{
new AsyncTask<Void, Void, Void>()
Expand Down

0 comments on commit 41d2bad

Please sign in to comment.