mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 13:48:55 +00:00
display message with empty inbox
This commit is contained in:
parent
c6c3f553dc
commit
4cbda57043
2 changed files with 19 additions and 14 deletions
|
|
@ -351,4 +351,5 @@ To start, which parts of your life do you want to improve?</string>
|
|||
<string name="market">Market</string>
|
||||
<string name="timeTravelers">Time Travelers</string>
|
||||
<string name="seasonalShop">Seasonal Shop</string>
|
||||
<string name="empty_inbox">You don\'t have any Inbox messages. You can send a user a new message from their public chat messages!</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -83,24 +83,28 @@ public class InboxFragment extends BaseMainFragment
|
|||
|
||||
roomsAdded = new ArrayList<>();
|
||||
|
||||
for (Object o : this.messages.entrySet()) {
|
||||
Map.Entry pair = (Map.Entry) o;
|
||||
if (this.messages.size() > 0) {
|
||||
for (Object o : this.messages.entrySet()) {
|
||||
Map.Entry pair = (Map.Entry) o;
|
||||
|
||||
ChatMessage message = (ChatMessage) pair.getValue();
|
||||
if (roomsAdded.contains(message.uuid)) {
|
||||
TextView entry = (TextView) this.inboxMessagesListView.findViewWithTag(message.uuid);
|
||||
entry.setText(message.user);
|
||||
} else {
|
||||
roomsAdded.add(message.uuid);
|
||||
ChatMessage message = (ChatMessage) pair.getValue();
|
||||
if (roomsAdded.contains(message.uuid)) {
|
||||
TextView entry = (TextView) this.inboxMessagesListView.findViewWithTag(message.uuid);
|
||||
entry.setText(message.user);
|
||||
} else {
|
||||
roomsAdded.add(message.uuid);
|
||||
|
||||
TextView entry = (TextView) inflater.inflate(R.layout.plain_list_item, this.inboxMessagesListView, false);
|
||||
entry.setText(message.user);
|
||||
entry.setTag(message.uuid);
|
||||
entry.setOnClickListener(this);
|
||||
this.inboxMessagesListView.addView(entry);
|
||||
TextView entry = (TextView) inflater.inflate(R.layout.plain_list_item, this.inboxMessagesListView, false);
|
||||
entry.setText(message.user);
|
||||
entry.setTag(message.uuid);
|
||||
entry.setOnClickListener(this);
|
||||
this.inboxMessagesListView.addView(entry);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TextView tv = new TextView(getContext());
|
||||
tv.setText(R.string.empty_inbox);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue