Commit f7d159d6 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Save user info to cache

parent a15164c3
......@@ -5,6 +5,7 @@ import android.content.Context;
import java.util.ArrayList;
import java.util.List;
import chat.rocket.android.RocketChatCache;
import chat.rocket.android.api.MethodCallHelper;
import chat.rocket.android.helper.LogIfError;
import chat.rocket.android.service.Registrable;
......@@ -56,6 +57,10 @@ public class CurrentUserObserver extends AbstractModelObserver<RealmUser> {
}
listeners = new ArrayList<>();
RocketChatCache.INSTANCE.setUserId(user.getId());
RocketChatCache.INSTANCE.setUserUsername(user.getUsername());
RocketChatCache.INSTANCE.setUserName(user.getName());
final String userId = user.getId();
// get and observe Room subscriptions.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment