Commit ab1987be authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix crash on switching rooms.

parent 6bc1faf3
......@@ -36,19 +36,19 @@ public class StreamRoomMessageManager implements Registerable {
}
private void registerStreamNotifyMessage(String roomId) {
streamRoomMessage = new StreamRoomMessage(context, realmHelper, ddpClient, roomId);
handler.post(() -> {
streamRoomMessage = new StreamRoomMessage(context, realmHelper, ddpClient, roomId);
streamRoomMessage.register();
});
}
private void unregisterStreamNotifyMessageIfNeeded() {
if (streamRoomMessage != null) {
handler.post(() -> {
handler.post(() -> {
if (streamRoomMessage != null) {
streamRoomMessage.unregister();
streamRoomMessage = null;
});
}
}
});
}
@Override public void register() {
......
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