fixed relationship.can_dm
This commit is contained in:
parent
b699c2d22c
commit
2b6cdeae65
|
@ -102,12 +102,12 @@ public class RelationshipImpl extends TwitterResponseImpl implements Relationshi
|
|||
|
||||
@Override
|
||||
public boolean canSourceMediaTagTarget() {
|
||||
return false;
|
||||
return source.canMediaTag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSourceDMTarget() {
|
||||
return false;
|
||||
return source.canDm;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -166,5 +166,9 @@ public class RelationshipImpl extends TwitterResponseImpl implements Relationshi
|
|||
boolean wantRetweets;
|
||||
@JsonField(name = "notifications_enabled")
|
||||
boolean notificationsEnabled;
|
||||
@JsonField(name = "can_dm")
|
||||
boolean canDm;
|
||||
@JsonField(name = "can_media_tag")
|
||||
boolean canMediaTag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ import android.os.Bundle;
|
|||
import android.os.Parcelable;
|
||||
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.NotificationCompat;
|
||||
import android.support.v4.app.NotificationCompat.Action;
|
||||
import android.support.v4.util.LongSparseArray;
|
||||
|
@ -97,6 +99,7 @@ import org.mariotaku.twidere.app.TwidereApplication;
|
|||
import org.mariotaku.twidere.constant.SharedPreferenceConstants;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.DraftsFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.ViewStatusDialogFragment;
|
||||
import org.mariotaku.twidere.model.DraftItem;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
|
@ -153,6 +156,7 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
private static final String EXTRA_SHOULD_SAVE_ACCOUNTS = "should_save_accounts";
|
||||
private static final String EXTRA_ORIGINAL_TEXT = "original_text";
|
||||
private static final String EXTRA_SHARE_SCREENSHOT = "share_screenshot";
|
||||
private static final String DISCARD_STATUS_DIALOG_FRAGMENT_TAG = "discard_status";
|
||||
|
||||
// Utility classes
|
||||
private final Extractor mExtractor = new Extractor();
|
||||
|
@ -1125,6 +1129,15 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
}
|
||||
|
||||
private void setProgressVisible(final boolean visible) {
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
final Fragment f = fm.findFragmentByTag(DISCARD_STATUS_DIALOG_FRAGMENT_TAG);
|
||||
if (!visible && f instanceof DialogFragment) {
|
||||
((DialogFragment) f).dismiss();
|
||||
} else if (visible) {
|
||||
SupportProgressDialogFragment df = new SupportProgressDialogFragment();
|
||||
df.show(fm, DISCARD_STATUS_DIALOG_FRAGMENT_TAG);
|
||||
df.setCancelable(false);
|
||||
}
|
||||
// mProgress.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue