that fields doesnt popup because they was shown only after onAuthCookieAcquired fired
This commit is contained in:
Dmytro Vodnik 2017-07-12 12:28:53 +03:00
parent 31b12ba399
commit f3d7465fef
2 changed files with 13 additions and 10 deletions

View file

@ -12,6 +12,7 @@ import java.io.IOException;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.theme.NavigationBaseActivity;
import timber.log.Timber;
public abstract class AuthenticatedActivity extends NavigationBaseActivity {

View file

@ -209,16 +209,6 @@ public class ShareActivity
protected void onAuthCookieAcquired(String authCookie) {
app.getMWApi().setAuthCookie(authCookie);
SingleUploadFragment shareView = (SingleUploadFragment) getSupportFragmentManager().findFragmentByTag("shareView");
categorizationFragment = (CategorizationFragment) getSupportFragmentManager().findFragmentByTag("categorization");
if(shareView == null && categorizationFragment == null) {
shareView = new SingleUploadFragment();
getSupportFragmentManager()
.beginTransaction()
.add(R.id.single_upload_fragment_container, shareView, "shareView")
.commitAllowingStateLoss();
}
uploadController.prepareService();
}
@Override
@ -311,6 +301,18 @@ public class ShareActivity
}
}
performPreuploadProcessingOfFile();
SingleUploadFragment shareView = (SingleUploadFragment) getSupportFragmentManager().findFragmentByTag("shareView");
categorizationFragment = (CategorizationFragment) getSupportFragmentManager().findFragmentByTag("categorization");
if(shareView == null && categorizationFragment == null) {
shareView = new SingleUploadFragment();
getSupportFragmentManager()
.beginTransaction()
.add(R.id.single_upload_fragment_container, shareView, "shareView")
.commitAllowingStateLoss();
}
uploadController.prepareService();
}
@Override