fixed dm crash

updated library version
This commit is contained in:
Mariotaku Lee 2016-03-12 14:46:47 +08:00
parent 85a74793c0
commit 134f9b0182
7 changed files with 22 additions and 22 deletions

View File

@ -38,7 +38,7 @@ android {
} }
dependencies { dependencies {
apt 'com.bluelinelabs:logansquare-compiler:1.3.4' apt 'com.bluelinelabs:logansquare-compiler:1.3.7'
compile 'com.github.mariotaku.RestFu:urlconnection:0.9.25' compile 'com.github.mariotaku.RestFu:urlconnection:0.9.25'
compile project(':twidere.library.extension') compile project(':twidere.library.extension')
compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['*.jar'])

View File

@ -11,7 +11,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'io.fabric.tools:gradle:1.21.2' classpath 'io.fabric.tools:gradle:1.21.5'
} }
} }
@ -77,7 +77,7 @@ dependencies {
apt 'com.bluelinelabs:logansquare-compiler:1.3.7' apt 'com.bluelinelabs:logansquare-compiler:1.3.7'
androidTestApt 'com.bluelinelabs:logansquare-compiler:1.3.7' androidTestApt 'com.bluelinelabs:logansquare-compiler:1.3.7'
apt 'com.hannesdorfmann.parcelableplease:processor:1.0.2' apt 'com.hannesdorfmann.parcelableplease:processor:1.0.2'
apt 'com.google.dagger:dagger-compiler:2.0.2' apt 'com.google.dagger:dagger-compiler:2.1'
apt "com.github.mariotaku.ObjectCursor:processor:0.9.6" apt "com.github.mariotaku.ObjectCursor:processor:0.9.6"
compile 'com.android.support:multidex:1.0.1' compile 'com.android.support:multidex:1.0.1'
@ -110,9 +110,9 @@ dependencies {
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2' compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
compile 'com.github.mariotaku:PickNCrop:0.9.3' compile 'com.github.mariotaku:PickNCrop:0.9.3'
compile 'com.github.mariotaku.RestFu:okhttp3:0.9.25' compile 'com.github.mariotaku.RestFu:okhttp3:0.9.25'
compile 'com.squareup.okhttp3:okhttp:3.1.2' compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.lnikkila:extendedtouchview:0.1.0' compile 'com.lnikkila:extendedtouchview:0.1.0'
compile 'com.google.dagger:dagger:2.0.2' compile 'com.google.dagger:dagger:2.1'
compile 'org.attoparser:attoparser:1.4.0.RELEASE' compile 'org.attoparser:attoparser:1.4.0.RELEASE'
compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.13' compile 'com.github.mariotaku.MediaViewerLibrary:base:0.9.13'
compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.13' compile 'com.github.mariotaku.MediaViewerLibrary:subsample-image-view:0.9.13'
@ -123,14 +123,14 @@ dependencies {
compile project(':twidere.component.nyan') compile project(':twidere.component.nyan')
googleCompile 'com.google.android.gms:play-services-maps:8.4.0' googleCompile 'com.google.android.gms:play-services-maps:8.4.0'
googleCompile 'com.google.maps.android:android-maps-utils:0.4' googleCompile 'com.google.maps.android:android-maps-utils:0.4.3'
googleCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true } googleCompile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true }
googleCompile ':YouTubeAndroidPlayerApi:1.2.2@jar' googleCompile ':YouTubeAndroidPlayerApi:1.2.2@jar'
fdroidCompile 'org.osmdroid:osmdroid-android:5.1' fdroidCompile 'org.osmdroid:osmdroid-android:5.1'
debugCompile 'com.facebook.stetho:stetho:1.3.0' debugCompile 'com.facebook.stetho:stetho:1.3.1'
debugCompile 'com.facebook.stetho:stetho-okhttp3:1.3.0' debugCompile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1' debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
provided 'javax.annotation:jsr250-api:1.0' provided 'javax.annotation:jsr250-api:1.0'

View File

@ -438,9 +438,9 @@ public class MessagesConversationFragment extends BaseSupportFragment implements
@Override @Override
public Loader<Cursor> onCreateLoader(final int id, final Bundle args) { public Loader<Cursor> onCreateLoader(final int id, final Bundle args) {
final UserKey accountId = args != null ? args.<UserKey>getParcelable(EXTRA_ACCOUNT_KEY) : null; final UserKey accountId = args != null ? args.<UserKey>getParcelable(EXTRA_ACCOUNT_KEY) : null;
final long recipientId = args != null ? args.getLong(EXTRA_RECIPIENT_ID, -1) : -1; final String recipientId = args != null ? args.getString(EXTRA_RECIPIENT_ID) : null;
final String[] cols = DirectMessages.COLUMNS; final String[] cols = DirectMessages.COLUMNS;
final boolean isValid = accountId != null && recipientId > 0; final boolean isValid = accountId != null && recipientId != null;
mConversationContainer.setVisibility(isValid ? View.VISIBLE : View.GONE); mConversationContainer.setVisibility(isValid ? View.VISIBLE : View.GONE);
mRecipientSelectorContainer.setVisibility(isValid ? View.GONE : View.VISIBLE); mRecipientSelectorContainer.setVisibility(isValid ? View.GONE : View.VISIBLE);
if (!isValid) { if (!isValid) {

View File

@ -828,7 +828,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
if (activity instanceof IThemedActivity) { if (activity instanceof IThemedActivity) {
ViewSupport.setBackground(mPagerOverlay, ThemeUtils.getNormalWindowContentOverlay(activity)); ViewSupport.setBackground(mPagerOverlay, ThemeUtils.getNormalWindowContentOverlay(activity));
ViewSupport.setBackground(mErrorOverlay, ThemeUtils.getNormalWindowContentOverlay(activity)); // ViewSupport.setBackground(mErrorOverlay, ThemeUtils.getNormalWindowContentOverlay(activity));
setUiColor(((IThemedActivity) activity).getCurrentThemeColor()); setUiColor(((IThemedActivity) activity).getCurrentThemeColor());
} }

View File

@ -606,9 +606,8 @@ public final class Utils implements Constants {
isAccountIdRequired = false; isAccountIdRequired = false;
final String paramRecipientId = uri.getQueryParameter(QUERY_PARAM_RECIPIENT_ID); final String paramRecipientId = uri.getQueryParameter(QUERY_PARAM_RECIPIENT_ID);
final String paramScreenName = uri.getQueryParameter(QUERY_PARAM_SCREEN_NAME); final String paramScreenName = uri.getQueryParameter(QUERY_PARAM_SCREEN_NAME);
final long conversationId = NumberUtils.toLong(paramRecipientId, -1); if (paramRecipientId != null) {
if (conversationId > 0) { args.putString(EXTRA_RECIPIENT_ID, paramRecipientId);
args.putLong(EXTRA_RECIPIENT_ID, conversationId);
} else if (paramScreenName != null) { } else if (paramScreenName != null) {
args.putString(EXTRA_SCREEN_NAME, paramScreenName); args.putString(EXTRA_SCREEN_NAME, paramScreenName);
} }
@ -2058,7 +2057,7 @@ public final class Utils implements Constants {
@Nullable @Nullable
public static ParcelableUser getUserForConversation(@NonNull final Context context, public static ParcelableUser getUserForConversation(@NonNull final Context context,
@NonNull final UserKey accountKey, @NonNull final UserKey accountKey,
final String conversationId) { @NonNull final String conversationId) {
final ContentResolver cr = context.getContentResolver(); final ContentResolver cr = context.getContentResolver();
final Expression where = Expression.and(Expression.equalsArgs(ConversationEntries.ACCOUNT_KEY), final Expression where = Expression.and(Expression.equalsArgs(ConversationEntries.ACCOUNT_KEY),
Expression.equalsArgs(ConversationEntries.CONVERSATION_ID)); Expression.equalsArgs(ConversationEntries.CONVERSATION_ID));

View File

@ -64,13 +64,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"> android:visibility="gone">
<View
android:id="@+id/error_window_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="?android:windowContentOverlay"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -93,6 +86,14 @@
android:layout_marginTop="@dimen/element_spacing_normal" android:layout_marginTop="@dimen/element_spacing_normal"
android:textAppearance="?android:textAppearanceMedium"/> android:textAppearance="?android:textAppearanceMedium"/>
</LinearLayout> </LinearLayout>
<View
android:id="@+id/error_window_overlay"
android:layout_width="match_parent"
android:layout_height="@dimen/element_spacing_normal"
android:layout_gravity="top"
android:background="@drawable/shadow_bottom"/>
</FrameLayout> </FrameLayout>