Search in sources :

Example 6 with UnreadCount

use of org.aisen.weibo.sina.sinasdk.bean.UnreadCount in project AisenWeiBo by wangdan.

the class NotificationPagerFragment method newInstance.

public static NotificationPagerFragment newInstance(int index) {
    if (index == -1) {
        index = 0;
        UnreadCount count = AppContext.getAccount().getUnreadCount();
        if (count != null && count.getCmt() == 0) {
            if (count.getMention_status() > 0) {
                index = 1;
            } else if (count.getMention_cmt() > 0) {
                index = 2;
            }
        }
    }
    NotificationPagerFragment fragment = new NotificationPagerFragment();
    Bundle args = new Bundle();
    args.putString(SET_INDEX, String.valueOf(index));
    fragment.setArguments(args);
    return fragment;
}
Also used : UnreadCount(org.aisen.weibo.sina.sinasdk.bean.UnreadCount) Bundle(android.os.Bundle)

Aggregations

UnreadCount (org.aisen.weibo.sina.sinasdk.bean.UnreadCount)6 PendingIntent (android.app.PendingIntent)1 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 Extra (org.aisen.android.component.orm.extra.Extra)1 TaskException (org.aisen.android.network.task.TaskException)1 UnreadCountNotifier (org.aisen.weibo.sina.service.notifier.UnreadCountNotifier)1 SetCount (org.aisen.weibo.sina.sinasdk.bean.SetCount)1