mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-26 02:42:16 -05:00
Ignore case of conversation's name
This commit is contained in:
parent
7376ba7856
commit
5f3948e6c5
@ -103,7 +103,7 @@ public class DeckAdapter extends BaseAdapter
|
|||||||
public int getPositionByName(String name)
|
public int getPositionByName(String name)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < conversations.size(); i++) {
|
for (int i = 0; i < conversations.size(); i++) {
|
||||||
if (conversations.get(i).getName().equals(name)) {
|
if (conversations.get(i).getName().equalsIgnoreCase(name)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public abstract class Conversation
|
|||||||
{
|
{
|
||||||
this.buffer = Collections.synchronizedList(new LinkedList<Message>());
|
this.buffer = Collections.synchronizedList(new LinkedList<Message>());
|
||||||
this.history = Collections.synchronizedList(new LinkedList<Message>());
|
this.history = Collections.synchronizedList(new LinkedList<Message>());
|
||||||
this.name = name;
|
this.name = name.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -229,7 +229,7 @@ public class Server
|
|||||||
*/
|
*/
|
||||||
public Conversation getConversation(String name)
|
public Conversation getConversation(String name)
|
||||||
{
|
{
|
||||||
return conversations.get(name);
|
return conversations.get(name.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -239,7 +239,7 @@ public class Server
|
|||||||
*/
|
*/
|
||||||
public void addConversationl(Conversation conversation)
|
public void addConversationl(Conversation conversation)
|
||||||
{
|
{
|
||||||
conversations.put(conversation.getName(), conversation);
|
conversations.put(conversation.getName().toLowerCase(), conversation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -249,7 +249,7 @@ public class Server
|
|||||||
*/
|
*/
|
||||||
public void removeConversation(String name)
|
public void removeConversation(String name)
|
||||||
{
|
{
|
||||||
conversations.remove(name);
|
conversations.remove(name.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user