예제 #1
0
 public void setTopic() {
   String topic = "";
   if (buffer.getInfo().type == BufferInfo.Type.QueryBuffer) {
     topic = buffer.getInfo().name;
   } else if (buffer.getInfo().type == BufferInfo.Type.StatusBuffer) {
     Network network = networks.getNetworkById(buffer.getInfo().networkId);
     topic =
         network.getName()
             + " ("
             + network.getServer()
             + ") | "
             + getResources().getString(R.string.users)
             + ": "
             + network.getCountUsers()
             + " | "
             + Helper.formatLatency(network.getLatency(), getResources());
   } else {
     topic = buffer.getInfo().name + ": " + buffer.getTopic();
   }
   topicView.setText(topic);
   topicViewFull.setText(topic);
 }
예제 #2
0
 @Override
 public int compareTo(Network another) {
   return getName().compareTo(another.getName());
 }