Commit 50aad817 by Lee Jaebin

プッシュメッセージ処理修正

parent 4411c5c5
...@@ -651,7 +651,13 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -651,7 +651,13 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
mPushMessageListAdapter.setAdapterListener(new PushMessageListAdapter.PushMessageListAdapterListener() { mPushMessageListAdapter.setAdapterListener(new PushMessageListAdapter.PushMessageListAdapterListener() {
@Override @Override
public void onDetailView(final PushMessageDto dto) { public void onDetailView(final PushMessageDto dto) {
showPushMessageDetailView(dto, pushMessageDtoList); showPushMessageDetailView(dto);
// プッシュメッセージで未読がなければ、下辺ツールバーのコミュニケーションボタンのバッジを外す
List<PushMessageDto> checkPushMessageList = mPushMessageListAdapter.getItems();
if (!checkUnReadCommunication(checkPushMessageList)) {
communicationButton.setImageResource(R.drawable.ic_communication_menu);
}
} }
}); });
mPushMessageListView.invalidate(); mPushMessageListView.invalidate();
...@@ -678,7 +684,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -678,7 +684,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
} }
// プッシュメッセージの詳細表示 // プッシュメッセージの詳細表示
private void showPushMessageDetailView(final PushMessageDto dto, List<PushMessageDto> pushMessageDtoList) { private void showPushMessageDetailView(final PushMessageDto dto) {
dto.readingFlg = true; dto.readingFlg = true;
TextView messageTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_message); TextView messageTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_message);
...@@ -691,15 +697,6 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -691,15 +697,6 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
sendUserTextView.setText(dto.pushSendLoginId); sendUserTextView.setText(dto.pushSendLoginId);
pushMessageLogic.updateReadingFlg(dto.pushMessageId); pushMessageLogic.updateReadingFlg(dto.pushMessageId);
// チェック用のプッシュメッセージリストをインスタント化して、該当のプッシュメッセージだけ削除する
List<PushMessageDto> checkPushMessageList = new ArrayList<>();
checkPushMessageList.addAll(pushMessageDtoList);
checkPushMessageList.remove(dto);
// 他のプッシュメッセージで未読がなければ、バッジを外す
if (!checkUnReadCommunication(checkPushMessageList)) {
communicationButton.setImageResource(R.drawable.ic_communication_menu);
}
showPushMessgeListView(false); showPushMessgeListView(false);
} }
......
...@@ -52,6 +52,10 @@ public class PushMessageListAdapter extends BaseAdapter { ...@@ -52,6 +52,10 @@ public class PushMessageListAdapter extends BaseAdapter {
notifyDataSetChanged(); notifyDataSetChanged();
} }
public List<PushMessageDto> getItems() {
return mListItem;
}
@Override @Override
public long getItemId(int position) { public long getItemId(int position) {
return mListItem.get(position).pushMessageId; return mListItem.get(position).pushMessageId;
......
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