Skip to content

Commit

Permalink
request an early login on explicit upload
Browse files Browse the repository at this point in the history
fixes streetcomplete#1446 - upload button was not working for unlogged users with low star count
affected people not logged in, with low star count and disabled autosync
  • Loading branch information
matkoniecz committed Jul 10, 2019
1 parent 5081040 commit 6b5dd22
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ 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 Expand Up @@ -907,8 +906,14 @@ private void triggerAutoUploadByUserInteraction()
{
if(questAutoSyncer.isAllowedByPreference())
{
if (!oAuth.isAuthorized()) requestOAuthorized();
else questAutoSyncer.triggerAutoUpload();
if (!oAuth.isAuthorized()) {
if(answersCounter.waitingForUpload() > 5) {
requestOAuthorized();
}
}
else {
questAutoSyncer.triggerAutoUpload();
}
}
}

Expand Down

0 comments on commit 6b5dd22

Please sign in to comment.