forked from organicmaps/organicmaps
[android] Added uploading immediately after update btn click
This commit is contained in:
parent
85f847407e
commit
b9f113a063
1 changed files with 14 additions and 6 deletions
|
@ -237,12 +237,6 @@ public class UgcSharingOptionsFragment extends BaseToolbarAuthFragment implement
|
|||
|
||||
private void onUpdateClickedInternal()
|
||||
{
|
||||
if (isNetworkConnectionAbsent())
|
||||
{
|
||||
showNoNetworkConnectionDialog();
|
||||
return;
|
||||
}
|
||||
|
||||
showUpdateCategoryConfirmationDialog();
|
||||
}
|
||||
|
||||
|
@ -360,10 +354,24 @@ public class UgcSharingOptionsFragment extends BaseToolbarAuthFragment implement
|
|||
{
|
||||
if (isDirectLinkUploadMode())
|
||||
requestDirectLink();
|
||||
else if (isPublishRefreshManual())
|
||||
requestPublishingImmediately();
|
||||
else
|
||||
openTagsScreen();
|
||||
}
|
||||
|
||||
private boolean isPublishRefreshManual()
|
||||
{
|
||||
return mCategory.getAccessRules() == BookmarkCategory.AccessRules.ACCESS_RULES_PUBLIC;
|
||||
}
|
||||
|
||||
private void requestPublishingImmediately()
|
||||
{
|
||||
showProgress();
|
||||
BookmarkManager.INSTANCE.uploadToCatalog(BookmarkCategory.AccessRules.ACCESS_RULES_PUBLIC,
|
||||
mCategory);
|
||||
}
|
||||
|
||||
private boolean isDirectLinkUploadMode()
|
||||
{
|
||||
return mCurrentMode == BookmarkCategory.AccessRules.ACCESS_RULES_DIRECT_LINK;
|
||||
|
|
Loading…
Add table
Reference in a new issue