Remove new from struct initialisation, as it is deprecated (#180)
* Remove new from struct initialisation, as it is deprecated. * Use Map.has_key instead of Map.contains, as it is deprecated.
This commit is contained in:
parent
e7b5aa140b
commit
1e1aa704a2
|
@ -58,7 +58,7 @@ public class ConnectionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RecMutexWrap {
|
private class RecMutexWrap {
|
||||||
public RecMutex mutex = new RecMutex();
|
public RecMutex mutex = RecMutex();
|
||||||
public void lock() { mutex.lock(); }
|
public void lock() { mutex.lock(); }
|
||||||
public void unlock() { mutex.unlock(); }
|
public void unlock() { mutex.unlock(); }
|
||||||
public bool trylock() { return mutex.trylock(); }
|
public bool trylock() { return mutex.trylock(); }
|
||||||
|
@ -121,7 +121,7 @@ public class ConnectionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Core.XmppStream? connect(Account account) {
|
public Core.XmppStream? connect(Account account) {
|
||||||
if (!connection_mutexes.contains(account)) connection_mutexes[account] = new RecMutexWrap();
|
if (!connection_mutexes.has_key(account)) connection_mutexes[account] = new RecMutexWrap();
|
||||||
if (!connection_todo.contains(account)) connection_todo.add(account);
|
if (!connection_todo.contains(account)) connection_todo.add(account);
|
||||||
if (!connections.has_key(account)) {
|
if (!connections.has_key(account)) {
|
||||||
return connect_(account);
|
return connect_(account);
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
|
||||||
private double? was_upper;
|
private double? was_upper;
|
||||||
private double? was_page_size;
|
private double? was_page_size;
|
||||||
|
|
||||||
private Mutex reloading_mutex = new Mutex();
|
private Mutex reloading_mutex = Mutex();
|
||||||
private bool animate = false;
|
private bool animate = false;
|
||||||
|
|
||||||
public ConversationView(StreamInteractor stream_interactor) {
|
public ConversationView(StreamInteractor stream_interactor) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace Xmpp.Xep.DateTimeProfiles {
|
namespace Xmpp.Xep.DateTimeProfiles {
|
||||||
|
|
||||||
public DateTime? parse_string(string time_string) {
|
public DateTime? parse_string(string time_string) {
|
||||||
TimeVal time_val = new TimeVal();
|
TimeVal time_val = TimeVal();
|
||||||
if (time_val.from_iso8601(time_string)) {
|
if (time_val.from_iso8601(time_string)) {
|
||||||
return new DateTime.from_unix_utc(time_val.tv_sec);
|
return new DateTime.from_unix_utc(time_val.tv_sec);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue