Always use Account.hash(equals)_func for HashMap+ArrayList
This commit is contained in:
parent
c44489214e
commit
22340cb88e
|
@ -268,7 +268,7 @@ public class Database : Qlite.Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Account> get_accounts() {
|
public ArrayList<Account> get_accounts() {
|
||||||
ArrayList<Account> ret = new ArrayList<Account>();
|
ArrayList<Account> ret = new ArrayList<Account>(Account.equals_func);
|
||||||
foreach(Row row in account.select()) {
|
foreach(Row row in account.select()) {
|
||||||
Account account = new Account.from_row(this, row);
|
Account account = new Account.from_row(this, row);
|
||||||
ret.add(account);
|
ret.add(account);
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Xmpp;
|
||||||
namespace Dino {
|
namespace Dino {
|
||||||
|
|
||||||
public class ModuleManager {
|
public class ModuleManager {
|
||||||
private HashMap<Account, ArrayList<XmppStreamModule>> module_map = new HashMap<Account, ArrayList<XmppStreamModule>>();
|
private HashMap<Account, ArrayList<XmppStreamModule>> module_map = new HashMap<Account, ArrayList<XmppStreamModule>>(Account.hash_func, Account.equals_func);
|
||||||
|
|
||||||
private EntityCapabilitiesStorage entity_capabilities_storage;
|
private EntityCapabilitiesStorage entity_capabilities_storage;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ protected class ConferenceList : FilterableList {
|
||||||
public signal void conversation_selected(Conversation? conversation);
|
public signal void conversation_selected(Conversation? conversation);
|
||||||
|
|
||||||
private StreamInteractor stream_interactor;
|
private StreamInteractor stream_interactor;
|
||||||
private HashMap<Account, Gee.List<Xep.Bookmarks.Conference>> lists = new HashMap<Account, Gee.List<Xep.Bookmarks.Conference>>();
|
private HashMap<Account, Gee.List<Xep.Bookmarks.Conference>> lists = new HashMap<Account, Gee.List<Xep.Bookmarks.Conference>>(Account.hash_func, Account.equals_func);
|
||||||
|
|
||||||
public ConferenceList(StreamInteractor stream_interactor) {
|
public ConferenceList(StreamInteractor stream_interactor) {
|
||||||
this.stream_interactor = stream_interactor;
|
this.stream_interactor = stream_interactor;
|
||||||
|
|
Loading…
Reference in a new issue