I think I made a change. Commiting and pushing just in case.

This commit is contained in:
vylion 2016-10-17 00:45:17 +02:00
parent e5504ca6e7
commit d5dc842cd0
3 changed files with 10 additions and 5 deletions

View file

@ -95,13 +95,12 @@ public class Chat {
lines = new ArrayList<String>();
Map.Entry<String, ArrayList<ChatListItem>> entry = (Map.Entry<String, ArrayList<ChatListItem>>) it.next();
lines.add("#List name:");
lines.add("#" + entry.getKey());
lines.add(entry.getKey());
if(name != null) {
lines.add("#Chat name:");
lines.add("#" + name);
lines.add("#Chat name: " + name);
}
lines.add("#List name: " + entry.getKey());
ArrayList<ChatListItem> list = entry.getValue();

View file

@ -60,7 +60,8 @@ public class Persistence {
for(int i = 0; i < lists.size(); i++) {
List<String> lines = lists.get(i);
String filename = lines.get(1).substring("#".length());
String filename = lines.get(1);
lines.remove(1);
try {
file = Paths.get("geiserFiles/" + c.getChatId() + "/lists/" + filename + ".txt");

View file

@ -1,6 +1,8 @@
package main;
import com.mashape.unirest.http.exceptions.UnirestException;
import elements.exceptions.ReadErrorChatException;
import elements.exceptions.ReadErrorListException;
/**
* Created by Guillermo Serrahima on 4/1/16.
@ -16,6 +18,9 @@ public class Main {
} catch (UnirestException e) {
System.out.println("Unirest Error catched.");
e.printStackTrace();
} catch (ReadErrorChatException | ReadErrorListException e) {
System.out.println("Read Error catched.");
e.printStackTrace();
}
}
}