private void savePositionToDB() {
   TimeLinePosition position = positionCache.get(currentGroupId);
   if (position == null) {
     savePositionToPositionsCache();
     position = positionCache.get(currentGroupId);
   }
   position.newMsgIds = newMsgTipBar.getValues();
   final String groupId = currentGroupId;
   FriendsTimeLineDBTask.asyncUpdatePosition(
       position, GlobalContext.getInstance().getCurrentAccountId(), groupId);
 }
Esempio n. 2
0
 public static TimeLinePosition empty() {
   TimeLinePosition position = new TimeLinePosition(0, 0, 0);
   position.empty = true;
   return position;
 }
 private void saveNewMsgCountToPositionsCache() {
   final TimeLinePosition position = positionCache.get(currentGroupId);
   position.newMsgIds = newMsgTipBar.getValues();
 }