Commit 3d06ad0a by 徐健

修复草稿功能

parent d9e0420d
......@@ -90,14 +90,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
protected void onDestroy() {
if (ActionHandlerStorage.getL(sessionId) != null)
ActionHandlerStorage.getL(sessionId).clear(sessionId);
//聊天返回时,检查是否有未发送内容,如果有则保存到ImTempData 临时map中,再次进入时读取
if (messageFragment != null) {
if (messageFragment.getInputPanel().getInputContent().equals("@")) {
messageFragment.getInputPanel().setInputContent("");
}
if (ActionHandlerStorage.getL(sessionId) != null)
ActionHandlerStorage.getL(sessionId).saveImTempData(sessionId, messageFragment.getInputPanel().getInputContent());
}
registerObservers(false);
super.onDestroy();
......@@ -218,6 +210,11 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
//清除对应ActionHandlerStorage的方法在这边进行调用
//而不是在YDLBaseMessageActivity的onDestroy中调用是因为ondestroy调用时机不确定,会导致第二次打开同一个activity找不到ActionHandlerStorage
if (isFinishing()) {
//聊天返回时,检查是否有未发送内容,如果有则保存到ImTempData 临时map中,再次进入时读取
if (messageFragment != null) {
if (ActionHandlerStorage.getL(sessionId) != null)
ActionHandlerStorage.getL(sessionId).saveImTempData(sessionId, messageFragment.getInputPanel().getInputContent());
}
ActionHandlerStorage.recycleL(sessionId);
}
}
......
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