code: private long getLastReadDate(Peer peer) {
          if (readStates.containsKey(peer)) {
              return readStates.get(peer);
          }
  
          byte[] data = storage.get(peer.getUnuqueId());
          if (data != null) {
              try {
                  return ReadState.fromBytes(data).getSortDate();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return 0;
      }
docs: Getting last read sort key for peer
  
  @param peer peer for key
  @return sort key, 0 if not available