mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-30 08:25:01 +01:00
fixed crashes when using browser sign in
updated version code
This commit is contained in:
parent
53565ee293
commit
8eb4ee994b
@ -10,7 +10,7 @@ android {
|
||||
applicationId "org.mariotaku.twidere"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 22
|
||||
versionCode 105
|
||||
versionCode 106
|
||||
versionName "0.3.0"
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
@ -32,10 +32,12 @@ import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
@ -503,10 +505,20 @@ public class SignInActivity extends BaseActionBarActivity implements TwitterCons
|
||||
setSignInButton();
|
||||
}
|
||||
|
||||
private final Handler mHandler = new Handler();
|
||||
|
||||
void onSignInStart() {
|
||||
if (isFinishing()) return;
|
||||
final SupportProgressDialogFragment fragment = SupportProgressDialogFragment.show(this, FRAGMENT_TAG_SIGN_IN_PROGRESS);
|
||||
fragment.setCancelable(false);
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isFinishing()) return;
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
final FragmentTransaction ft = fm.beginTransaction();
|
||||
final SupportProgressDialogFragment fragment = new SupportProgressDialogFragment();
|
||||
fragment.setCancelable(false);
|
||||
fragment.show(ft, FRAGMENT_TAG_SIGN_IN_PROGRESS);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static abstract class AbstractSignInTask extends AsyncTask<Void, Void, SignInResponse> {
|
||||
|
@ -22,13 +22,15 @@ package org.mariotaku.twidere.fragment.support;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
|
||||
public class SupportProgressDialogFragment extends BaseSupportDialogFragment {
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(final Bundle savedInstanceState) {
|
||||
final ProgressDialog dialog = new ProgressDialog(getActivity());
|
||||
dialog.setMessage(getString(R.string.please_wait));
|
||||
|
@ -16,7 +16,7 @@
|
||||
android:order="22"
|
||||
android:title="@string/name_first"/>
|
||||
<org.mariotaku.twidere.preference.AutoFixCheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:defaultValue="true"
|
||||
android:key="display_profile_image"
|
||||
android:order="23"
|
||||
android:title="@string/profile_image"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user