Commit 5939b283 by 霍志良

feat:延迟滚动

parent d2203d2d
......@@ -177,13 +177,6 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
}
}
}
if (multipleAnswers.size() > 0) {
confirm_multiple_choice.setEnabled(true);
confirm_multiple_choice.setBackground(context.getResources().getDrawable(R.drawable.im_background_18dp_1da1f2));
} else {
confirm_multiple_choice.setEnabled(false);
confirm_multiple_choice.setBackground(context.getResources().getDrawable(R.drawable.im_background_18dp_ebebeb));
}
}
} else {
......
......@@ -42,6 +42,7 @@ import com.netease.nimlib.sdk.team.constant.TeamMemberType;
import com.netease.nimlib.sdk.team.model.TeamMember;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.session.extension.CustomAttachLingxiWhichQuestion;
import com.yidianling.nimbase.api.model.main.CustomPushContentProvider;
import com.yidianling.nimbase.api.model.user.UserInfoObserver;
import com.yidianling.nimbase.business.preference.UserPreferences;
......@@ -298,10 +299,23 @@ public class MessageListPanelEx {
IMMessage lastMsg = messages.get(messages.size() - 1);
if (isMyMessage(lastMsg)) {
if (needScrollToBottom) {
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
messageListView.postDelayed(new Runnable() {
@Override
public void run() {
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
}
},200);
} else if (incomingMsgPrompt != null && lastMsg.getSessionType() != SessionTypeEnum.ChatRoom) {
incomingMsgPrompt.show(lastMsg);
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
if (lastMsg.getAttachment() instanceof CustomAttachLingxiWhichQuestion){
messageListView.postDelayed(new Runnable() {
@Override
public void run() {
messageListView.smoothScrollToPosition(adapter.getBottomDataPosition());
}
},200);
}else{
incomingMsgPrompt.show(lastMsg);
}
}
}
}
......
......@@ -7,7 +7,7 @@
android:paddingLeft="10dp"
android:paddingRight="@dimen/platform_dp_10"
android:paddingTop="@dimen/platform_dp_6"
android:paddingBottom="@dimen/platform_dp_6">
android:paddingBottom="@dimen/platform_dp_12">
<TextView
android:id="@+id/message_item_time"
......
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