mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Added reading inbox
This commit is contained in:
parent
c2d438f871
commit
46320f4ba3
12 changed files with 432 additions and 7 deletions
41
Habitica/res/layout/fragment_inbox.xml
Normal file
41
Habitica/res/layout/fragment_inbox.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/inbox_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/SectionTitle"
|
||||
android:text="@string/sidebar.inbox"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default">
|
||||
<LinearLayout
|
||||
android:id="@+id/inbox_messages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:orientation="vertical"
|
||||
android:divider="?android:listDivider"
|
||||
android:showDividers="middle">
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
18
Habitica/res/layout/fragment_inbox_message_list.xml
Normal file
18
Habitica/res/layout/fragment_inbox_message_list.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/inbox_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/chat.list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:divider="@null"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<string name="sidebar.tasks">Tasks</string>
|
||||
<string name="sidebar.skills">Skills</string>
|
||||
<string name="sidebar.section.social">Social</string>
|
||||
<string name="sidebar.inbox">Inbox</string>
|
||||
<string name="sidebar.tavern">Tavern</string>
|
||||
<string name="sidebar.party">Party</string>
|
||||
<string name="sidebar.purchaseGems">Purchase Gems</string>
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@
|
|||
<string name="about.bugreport">Report a Bug</string>
|
||||
<string name="about.source_code">Source Code</string>
|
||||
|
||||
<!-- Network Errors -->
|
||||
<string name="network_error_title">Connection Error</string>
|
||||
<string name="network_error_no_network_body">You are not connected to the internet.</string>
|
||||
<!-- Network Errors -->
|
||||
<string name="network_error_title">Connection Error</string>
|
||||
<string name="network_error_no_network_body">You are not connected to the internet.</string>
|
||||
<string name="internal_error_api">There seems to be a problem with the server. Try again later.</string>
|
||||
|
||||
<string name="authentication_error_title">Authentication Error</string>
|
||||
|
|
@ -347,4 +347,7 @@ To start, which parts of your life do you want to improve?</string>
|
|||
<string name="open_in_store">Open in play store</string>
|
||||
<string name="change_class_confirmation">Are you sure you want to change your class? This will cost 3 gems.</string>
|
||||
<string name="leaderMessage" formatted="false">Message from %1$s</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ import okhttp3.Request;
|
|||
import okhttp3.Response;
|
||||
import okhttp3.ResponseBody;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import okio.Buffer;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Converter;
|
||||
import retrofit2.Retrofit;
|
||||
|
|
@ -151,7 +152,7 @@ public class APIHelper implements Action1<Throwable> {
|
|||
|
||||
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
|
||||
if (BuildConfig.DEBUG) {
|
||||
logging.setLevel(HttpLoggingInterceptor.Level.BASIC);
|
||||
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
}
|
||||
|
||||
OkHttpClient client = new OkHttpClient.Builder()
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ public class HabitDatabase {
|
|||
|
||||
public static final String NAME = "Habitica";
|
||||
|
||||
public static final int VERSION = 21;
|
||||
public static final int VERSION = 22;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ import com.habitrpg.android.habitica.ui.fragments.social.ChatListFragment;
|
|||
import com.habitrpg.android.habitica.ui.fragments.social.GroupInformationFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.GuildFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.GuildsOverviewFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.InboxFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.InboxMessageListFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.PublicGuildsFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.TavernFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.party.PartyFragment;
|
||||
|
|
@ -144,4 +146,8 @@ public interface AppComponent {
|
|||
void inject(HabiticaApplication habiticaApplication);
|
||||
|
||||
void inject(PreferencesFragment preferencesFragment);
|
||||
|
||||
void inject(InboxFragment inboxFragment);
|
||||
|
||||
void inject(InboxMessageListFragment inboxMessageListFragment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,114 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.social;
|
||||
|
||||
import com.facebook.internal.BoltsMeasurementEventListener;
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.callbacks.HabitRPGUserCallback;
|
||||
import com.habitrpg.android.habitica.components.AppComponent;
|
||||
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.ChatMessage;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.util.ArrayMap;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class InboxFragment extends BaseMainFragment
|
||||
implements SwipeRefreshLayout.OnRefreshListener, View.OnClickListener, HabitRPGUserCallback.OnUserReceived {
|
||||
|
||||
@BindView(R.id.inbox_messages)
|
||||
LinearLayout inboxMessagesListView;
|
||||
|
||||
@BindView(R.id.inbox_refresh_layout)
|
||||
SwipeRefreshLayout swipeRefreshLayout;
|
||||
|
||||
Map<String, ChatMessage> messages;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
View v = inflater.inflate(R.layout.fragment_inbox, container, false);
|
||||
unbinder = ButterKnife.bind(this, v);
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(this);
|
||||
|
||||
this.messages = this.user.getInbox().getMessages();
|
||||
if (this.messages != null) {
|
||||
this.setInboxMessages();
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(AppComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
swipeRefreshLayout.setRefreshing(true);
|
||||
this.apiHelper.retrieveUser(true)
|
||||
.compose(apiHelper.configureApiCallObserver())
|
||||
.subscribe(new HabitRPGUserCallback(this), throwable -> {});
|
||||
}
|
||||
|
||||
public void setInboxMessages() {
|
||||
if (this.inboxMessagesListView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.inboxMessagesListView.removeAllViewsInLayout();
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
Map<String,Boolean> roomsAdded = new HashMap<String, Boolean>();
|
||||
|
||||
Iterator it = this.messages.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry pair = (Map.Entry)it.next();
|
||||
|
||||
ChatMessage message = (ChatMessage) pair.getValue();
|
||||
if (roomsAdded.get(message.user) != null && roomsAdded.get(message.user)) return;
|
||||
roomsAdded.put(message.user, true);
|
||||
|
||||
TextView entry = (TextView) inflater.inflate(R.layout.plain_list_item, this.inboxMessagesListView, false);
|
||||
entry.setText(message.user);
|
||||
entry.setOnClickListener(this);
|
||||
this.inboxMessagesListView.addView(entry);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
TextView entry = (TextView) v;
|
||||
InboxMessageListFragment inboxMessageListFragment = new InboxMessageListFragment();
|
||||
Log.v("test", entry.getText().toString());
|
||||
inboxMessageListFragment.setMessages(this.messages, entry.getText().toString());
|
||||
this.activity.displayFragment(inboxMessageListFragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserReceived(HabitRPGUser user) {
|
||||
this.user = user;
|
||||
this.messages = user.getInbox().getMessages();
|
||||
this.setInboxMessages();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments.social;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.callbacks.HabitRPGUserCallback;
|
||||
import com.habitrpg.android.habitica.components.AppComponent;
|
||||
import com.habitrpg.android.habitica.ui.adapter.social.ChatRecyclerViewAdapter;
|
||||
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.ChatMessage;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* Created by keithholliday on 6/20/16.
|
||||
*/
|
||||
public class InboxMessageListFragment extends BaseMainFragment
|
||||
implements SwipeRefreshLayout.OnRefreshListener, HabitRPGUserCallback.OnUserReceived {
|
||||
|
||||
@BindView(R.id.inbox_refresh_layout)
|
||||
SwipeRefreshLayout swipeRefreshLayout;
|
||||
|
||||
@BindView(R.id.chat_list)
|
||||
RecyclerView chatRecyclerView;
|
||||
|
||||
List<ChatMessage> messages;
|
||||
ChatRecyclerViewAdapter chatAdapter;
|
||||
String chatRoomUser;
|
||||
|
||||
public InboxMessageListFragment() {
|
||||
messages = new ArrayList<ChatMessage>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_inbox_message_list, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
swipeRefreshLayout.setOnRefreshListener(this);
|
||||
|
||||
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this.getActivity());
|
||||
chatRecyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
chatAdapter = new ChatRecyclerViewAdapter(messages, null, null, false);
|
||||
chatRecyclerView.setAdapter(chatAdapter);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(AppComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
swipeRefreshLayout.setRefreshing(true);
|
||||
this.apiHelper.retrieveUser(true)
|
||||
.compose(apiHelper.configureApiCallObserver())
|
||||
.subscribe(new HabitRPGUserCallback(this), throwable -> {});
|
||||
}
|
||||
|
||||
public void setMessages(Map<String, ChatMessage> messages, String chatRoomUser) {
|
||||
this.chatRoomUser = chatRoomUser;
|
||||
|
||||
Iterator it = messages.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry pair = (Map.Entry)it.next();
|
||||
ChatMessage message = (ChatMessage) pair.getValue();
|
||||
if (!message.user.equals(chatRoomUser)) continue;
|
||||
this.messages.add(message);
|
||||
}
|
||||
|
||||
if (this.chatAdapter != null) {
|
||||
this.chatAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserReceived(HabitRPGUser user) {
|
||||
this.user = user;
|
||||
this.setMessages(user.getInbox().getMessages(), this.chatRoomUser);
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ import com.habitrpg.android.habitica.ui.fragments.inventory.items.ItemsFragment;
|
|||
import com.habitrpg.android.habitica.ui.fragments.inventory.stable.StableFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.skills.SkillsFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.GuildsOverviewFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.InboxFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.TavernFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.party.PartyFragment;
|
||||
import com.habitrpg.android.habitica.ui.fragments.tasks.TasksFragment;
|
||||
|
|
@ -32,6 +33,7 @@ public class MainDrawerBuilder {
|
|||
// Change the identificationIDs to the position IDs so that its easier to set the selected entry
|
||||
public static final int SIDEBAR_TASKS = 0;
|
||||
public static final int SIDEBAR_SKILLS = 1;
|
||||
public static final int SIDEBAR_INBOX = 15;
|
||||
public static final int SIDEBAR_TAVERN = 3;
|
||||
public static final int SIDEBAR_PARTY = 4;
|
||||
public static final int SIDEBAR_GUILDS = 5;
|
||||
|
|
@ -44,8 +46,7 @@ public class MainDrawerBuilder {
|
|||
public static final int SIDEBAR_SETTINGS = 12;
|
||||
public static final int SIDEBAR_HELP = 13;
|
||||
public static final int SIDEBAR_ABOUT = 14;
|
||||
|
||||
|
||||
|
||||
public static AccountHeaderBuilder CreateDefaultAccountHeader(final Activity activity) {
|
||||
return new AccountHeaderBuilder()
|
||||
.withActivity(activity)
|
||||
|
|
@ -73,6 +74,7 @@ public class MainDrawerBuilder {
|
|||
new PrimaryDrawerItem().withName(activity.getString(R.string.sidebar_skills)).withIdentifier(SIDEBAR_SKILLS),
|
||||
|
||||
new SectionIconDrawerItem().withName(activity.getString(R.string.sidebar_section_social).toUpperCase()),
|
||||
new PrimaryDrawerItem().withName(activity.getString(R.string.sidebar_inbox)).withIdentifier(SIDEBAR_INBOX),
|
||||
new PrimaryDrawerItem().withName(activity.getString(R.string.sidebar_tavern)).withIdentifier(SIDEBAR_TAVERN),
|
||||
new PrimaryDrawerItem().withName(activity.getString(R.string.sidebar_party)).withIdentifier(SIDEBAR_PARTY),
|
||||
new PrimaryDrawerItem().withName(activity.getString(R.string.sidebar_guilds)).withIdentifier(SIDEBAR_GUILDS),
|
||||
|
|
@ -106,6 +108,10 @@ public class MainDrawerBuilder {
|
|||
fragment = new SkillsFragment();
|
||||
break;
|
||||
}
|
||||
case SIDEBAR_INBOX: {
|
||||
fragment = new InboxFragment();
|
||||
break;
|
||||
}
|
||||
case SIDEBAR_PARTY: {
|
||||
fragment = new PartyFragment();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ public class HabitRPGUser extends BaseModel {
|
|||
foreignColumnName = "id")})
|
||||
private Stats stats;
|
||||
|
||||
@Column
|
||||
@ForeignKey(references = {@ForeignKeyReference(columnName = "inbox_id",
|
||||
columnType = String.class,
|
||||
foreignColumnName = "user_Id")})
|
||||
private Inbox inbox;
|
||||
|
||||
@Column
|
||||
@ForeignKey(references = {@ForeignKeyReference(columnName = "preferences_id",
|
||||
columnType = String.class,
|
||||
|
|
@ -104,10 +110,19 @@ public class HabitRPGUser extends BaseModel {
|
|||
return stats;
|
||||
}
|
||||
|
||||
public void setInbox(Inbox inbox) {
|
||||
this.inbox = inbox;
|
||||
}
|
||||
|
||||
public Inbox getInbox() {
|
||||
return inbox;
|
||||
}
|
||||
|
||||
public void setStats(Stats stats) {
|
||||
this.stats = stats;
|
||||
}
|
||||
|
||||
|
||||
public Profile getProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
|
@ -258,6 +273,7 @@ public class HabitRPGUser extends BaseModel {
|
|||
preferences.user_id = id;
|
||||
stats.id = id;
|
||||
profile.user_Id = id;
|
||||
inbox.user_Id = id;
|
||||
items.user_id = id;
|
||||
authentication.user_id = id;
|
||||
flags.user_id = id;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
package com.magicmicky.habitrpgwrapper.lib.models;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.habitrpg.android.habitica.HabitDatabase;
|
||||
import com.raizlabs.android.dbflow.annotation.Column;
|
||||
import com.raizlabs.android.dbflow.annotation.NotNull;
|
||||
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
|
||||
import com.raizlabs.android.dbflow.annotation.Table;
|
||||
import com.raizlabs.android.dbflow.structure.BaseModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by keithholliday on 6/20/16.
|
||||
*/
|
||||
@Table(databaseName = HabitDatabase.NAME)
|
||||
public class Inbox extends BaseModel {
|
||||
|
||||
@Column
|
||||
@PrimaryKey
|
||||
// @NotNull
|
||||
String user_Id;
|
||||
|
||||
@SerializedName("optOut")
|
||||
@Expose
|
||||
private Boolean optOut;
|
||||
|
||||
@SerializedName("messages")
|
||||
@Expose
|
||||
private Map<String, ChatMessage> messages;
|
||||
|
||||
@SerializedName("blocks")
|
||||
@Expose
|
||||
private List<Object> blocks = new ArrayList<Object>();
|
||||
|
||||
@SerializedName("newMessages")
|
||||
@Expose
|
||||
private Integer newMessages;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* The optOut
|
||||
*/
|
||||
public Boolean getOptOut() {
|
||||
return optOut;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param optOut
|
||||
* The optOut
|
||||
*/
|
||||
public void setOptOut(Boolean optOut) {
|
||||
this.optOut = optOut;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* The messages
|
||||
*/
|
||||
public Map<String, ChatMessage> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param messages
|
||||
* The messages
|
||||
*/
|
||||
public void setMessages(Map<String, ChatMessage> messages) {
|
||||
this.messages = messages;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* The blocks
|
||||
*/
|
||||
public List<Object> getBlocks() {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param blocks
|
||||
* The blocks
|
||||
*/
|
||||
public void setBlocks(List<Object> blocks) {
|
||||
this.blocks = blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* The newMessages
|
||||
*/
|
||||
public Integer getNewMessages() {
|
||||
return newMessages;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param newMessages
|
||||
* The newMessages
|
||||
*/
|
||||
public void setNewMessages(Integer newMessages) {
|
||||
this.newMessages = newMessages;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue