1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2025-07-11 16:56:25 +00:00

UserManager is now a Singleton as well.

This commit is contained in:
2017-02-22 06:57:58 +01:00
parent 42112d7607
commit 6d772a3be1
7 changed files with 36 additions and 26 deletions

View File

@ -32,7 +32,7 @@ class TelegramUpdateHandler implements UpdateCallback {
private Database db = null;
public boolean debug = false;
public void setUser(UserManager user, TelegramClient client) { this.user = user; this.db = new Database(user, client, false);}
public void activate() { this.user = UserManager.getInstance(); this.db = Database.getInstance();}
public void onUpdates(TelegramClient c, TLUpdates u) {
if (db==null) return;