コード例 #1
0
ファイル: HistoryStorage.java プロジェクト: TLemur/SawimNE
 public void removeHistory() {
   try {
     Contact contact =
         RosterHelper.getInstance().getProtocol(protocolId).getItemByUID(uniqueUserId);
     contact.firstServerMsgId = "";
     // RosterStorage.updateFirstServerMsgId(contact);
     RosterHelper.getInstance()
         .getProtocol(protocolId)
         .getStorage()
         .updateUnreadMessagesCount(protocolId, uniqueUserId, 0);
     SawimApplication.getDatabaseHelper()
         .getWritableDatabase()
         .delete(
             DatabaseHelper.TABLE_CHAT_HISTORY,
             WHERE_ACC_CONTACT_ID,
             new String[] {protocolId, uniqueUserId});
   } catch (Exception e) {
     DebugLog.panic(e);
   }
 }