fixed bug causes dm notification not clickable

fixed scroll to top doesn't clear unread count
This commit is contained in:
Mariotaku Lee 2015-04-21 11:38:09 +08:00
parent 9336704677
commit 196ddfe9cb
2 changed files with 6 additions and 3 deletions

View File

@ -360,8 +360,11 @@ public abstract class AbsStatusesFragment<Data> extends AbsContentListFragment<A
@Override @Override
public final boolean scrollToStart() { public final boolean scrollToStart() {
final boolean result = super.scrollToStart();
if (result) {
saveReadPosition(); saveReadPosition();
return super.scrollToStart(); }
return result;
} }
@Override @Override

View File

@ -1174,7 +1174,7 @@ public final class TwidereDataProvider extends ContentProvider implements Consta
builder.setContentText(notificationContent); builder.setContentText(notificationContent);
builder.setCategory(NotificationCompat.CATEGORY_SOCIAL); builder.setCategory(NotificationCompat.CATEGORY_SOCIAL);
builder.setContentIntent(getContentIntent(context, AUTHORITY_DIRECT_MESSAGES, accountId)); builder.setContentIntent(getContentIntent(context, AUTHORITY_DIRECT_MESSAGES, accountId));
builder.setContentIntent(getDeleteIntent(context, AUTHORITY_DIRECT_MESSAGES, accountId, positions)); builder.setDeleteIntent(getDeleteIntent(context, AUTHORITY_DIRECT_MESSAGES, accountId, positions));
builder.setNumber(messagesCount); builder.setNumber(messagesCount);
builder.setWhen(when); builder.setWhen(when);
builder.setStyle(style); builder.setStyle(style);