fixed status color
This commit is contained in:
parent
a96be8851e
commit
67912930cf
|
@ -729,6 +729,8 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
|
||||||
mAccountKey, false);
|
mAccountKey, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ParcelableStatusUtils.updateExtraInformation(result, credentials,
|
||||||
|
mUserColorNameManager);
|
||||||
Utils.setLastSeen(mContext, result.mentions, System.currentTimeMillis());
|
Utils.setLastSeen(mContext, result.mentions, System.currentTimeMillis());
|
||||||
final ContentValues values = new ContentValues();
|
final ContentValues values = new ContentValues();
|
||||||
values.put(Statuses.IS_FAVORITE, true);
|
values.put(Statuses.IS_FAVORITE, true);
|
||||||
|
@ -1334,13 +1336,19 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SingleResponse<ParcelableStatus> doInBackground(final Object... params) {
|
protected SingleResponse<ParcelableStatus> doInBackground(final Object... params) {
|
||||||
final Twitter twitter = TwitterAPIFactory.getTwitterInstance(mContext, mAccountKey, false);
|
final ParcelableCredentials credentials = ParcelableCredentialsUtils.getCredentials(mContext,
|
||||||
|
mAccountKey);
|
||||||
|
if (credentials == null) return SingleResponse.getInstance();
|
||||||
|
final Twitter twitter = TwitterAPIFactory.getTwitterInstance(mContext, credentials, true,
|
||||||
|
true);
|
||||||
if (twitter == null) return SingleResponse.getInstance();
|
if (twitter == null) return SingleResponse.getInstance();
|
||||||
ParcelableStatus status = null;
|
ParcelableStatus status = null;
|
||||||
TwitterException exception = null;
|
TwitterException exception = null;
|
||||||
try {
|
try {
|
||||||
status = ParcelableStatusUtils.fromStatus(twitter.destroyStatus(mStatusId),
|
status = ParcelableStatusUtils.fromStatus(twitter.destroyStatus(mStatusId),
|
||||||
mAccountKey, false);
|
mAccountKey, false);
|
||||||
|
ParcelableStatusUtils.updateExtraInformation(status, credentials,
|
||||||
|
mUserColorNameManager);
|
||||||
} catch (final TwitterException e) {
|
} catch (final TwitterException e) {
|
||||||
exception = e;
|
exception = e;
|
||||||
}
|
}
|
||||||
|
@ -1550,13 +1558,18 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SingleResponse<ParcelableStatus> doInBackground(final Object... params) {
|
protected SingleResponse<ParcelableStatus> doInBackground(final Object... params) {
|
||||||
final Twitter twitter = TwitterAPIFactory.getTwitterInstance(mContext, mAccountKey, true);
|
final ParcelableCredentials credentials = ParcelableCredentialsUtils.getCredentials(mContext,
|
||||||
|
mAccountKey);
|
||||||
|
if (credentials == null) return SingleResponse.getInstance();
|
||||||
|
final Twitter twitter = TwitterAPIFactory.getTwitterInstance(mContext, credentials, true, true);
|
||||||
if (twitter == null) {
|
if (twitter == null) {
|
||||||
return SingleResponse.getInstance();
|
return SingleResponse.getInstance();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final ParcelableStatus result = ParcelableStatusUtils.fromStatus(twitter.retweetStatus(mStatusId),
|
final ParcelableStatus result = ParcelableStatusUtils.fromStatus(twitter.retweetStatus(mStatusId),
|
||||||
mAccountKey, false);
|
mAccountKey, false);
|
||||||
|
ParcelableStatusUtils.updateExtraInformation(result, credentials,
|
||||||
|
mUserColorNameManager);
|
||||||
Utils.setLastSeen(mContext, result.mentions, System.currentTimeMillis());
|
Utils.setLastSeen(mContext, result.mentions, System.currentTimeMillis());
|
||||||
final ContentValues values = new ContentValues();
|
final ContentValues values = new ContentValues();
|
||||||
values.put(Statuses.MY_RETWEET_ID, result.id);
|
values.put(Statuses.MY_RETWEET_ID, result.id);
|
||||||
|
@ -1571,7 +1584,6 @@ public class AsyncTwitterWrapper extends TwitterWrapper {
|
||||||
for (final Uri uri : TwidereDataStore.STATUSES_URIS) {
|
for (final Uri uri : TwidereDataStore.STATUSES_URIS) {
|
||||||
mResolver.update(uri, values, where.getSQL(), whereArgs);
|
mResolver.update(uri, values, where.getSQL(), whereArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataStoreUtils.updateActivityStatus(mResolver, mAccountKey, mStatusId, new DataStoreUtils.UpdateActivityAction() {
|
DataStoreUtils.updateActivityStatus(mResolver, mAccountKey, mStatusId, new DataStoreUtils.UpdateActivityAction() {
|
||||||
@Override
|
@Override
|
||||||
public void process(ParcelableActivity activity) {
|
public void process(ParcelableActivity activity) {
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class IntentUtils implements Constants {
|
||||||
intent.setData(testBuilder.build());
|
intent.setData(testBuilder.build());
|
||||||
|
|
||||||
final ComponentName componentName = intent.resolveActivity(context.getPackageManager());
|
final ComponentName componentName = intent.resolveActivity(context.getPackageManager());
|
||||||
if (componentName == null) return null;
|
if (componentName == null || componentName.getClassName() == null) return null;
|
||||||
return componentName.getPackageName();
|
return componentName.getPackageName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue