Commit 02b86365 authored by Yusuke Iwaki's avatar Yusuke Iwaki

just rename methods

parent 3b618e38
......@@ -24,7 +24,7 @@ abstract class AbstractChatRoomFragment extends AbstractFragment {
return super.onCreateView(inflater, container, savedInstanceState);
}
protected void setTitleText(@StringRes int stringResId) {
protected void setToolbarTitle(@StringRes int stringResId) {
if (roomToolbar == null) {
return;
}
......@@ -32,7 +32,7 @@ abstract class AbstractChatRoomFragment extends AbstractFragment {
roomToolbar.setTitle(stringResId);
}
protected void setTitleText(CharSequence title) {
protected void setToolbarTitle(CharSequence title) {
if (roomToolbar == null) {
return;
}
......@@ -40,7 +40,7 @@ abstract class AbstractChatRoomFragment extends AbstractFragment {
roomToolbar.setTitle(title);
}
protected void setTitleDrawableLeft(@DrawableRes int drawableResId) {
protected void setToolbarRoomIcon(@DrawableRes int drawableResId) {
if (roomToolbar == null) {
return;
}
......
......@@ -13,13 +13,13 @@ public class HomeFragment extends AbstractChatRoomFragment {
@Override
protected void onSetupView() {
setTitleText(R.string.home_fragment_title);
setToolbarTitle(R.string.home_fragment_title);
}
@Override
public void onResume() {
super.onResume();
setTitleDrawableLeft(0);
setTitleText(R.string.home_fragment_title);
setToolbarRoomIcon(0);
setToolbarTitle(R.string.home_fragment_title);
}
}
......@@ -266,15 +266,15 @@ public class RoomFragment extends AbstractChatRoomFragment
String type = roomSubscription.getType();
if (RoomSubscription.TYPE_CHANNEL.equals(type)) {
setTitleDrawableLeft(R.drawable.ic_hashtag_gray_24dp);
setToolbarRoomIcon(R.drawable.ic_hashtag_gray_24dp);
} else if (RoomSubscription.TYPE_PRIVATE.equals(type)) {
setTitleDrawableLeft(R.drawable.ic_lock_gray_24dp);
setToolbarRoomIcon(R.drawable.ic_lock_gray_24dp);
} else if (RoomSubscription.TYPE_DIRECT_MESSAGE.equals(type)) {
setTitleDrawableLeft(R.drawable.ic_at_gray_24dp);
setToolbarRoomIcon(R.drawable.ic_at_gray_24dp);
} else {
setTitleDrawableLeft(0);
setToolbarRoomIcon(0);
}
setTitleText(roomSubscription.getName());
setToolbarTitle(roomSubscription.getName());
}
private void onUpdateLoadMessageProcedure(LoadMessageProcedure procedure) {
......
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