Browse Source

fix bug where changing the orientation would make EditorView's visibility to GONE

pull/68/head
Thodoris Tyrovouzis 5 years ago
parent
commit
3e28b3a03b
  1. 5
      app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java
  2. 2
      app/src/main/res/layout/fragment_shoutbox.xml

5
app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java

@ -107,7 +107,7 @@ public class ShoutboxFragment extends Fragment {
shoutAdapter.notifyDataSetChanged();
}
});
shoutboxViewModel.setOnShoutboxTaskStarted(this::onShoutboxTaskSarted);
shoutboxViewModel.setOnShoutboxTaskStarted(this::onShoutboxTaskStarted);
shoutboxViewModel.setOnShoutboxTaskFinished(this::onShoutboxTaskFinished);
shoutboxViewModel.setOnSendShoutTaskStarted(this::onSendShoutTaskStarted);
shoutboxViewModel.setOnSendShoutTaskFinished(this::onSendShoutTaskFinished);
@ -115,9 +115,10 @@ public class ShoutboxFragment extends Fragment {
shoutboxViewModel.loadShoutbox(false);
}
private void onShoutboxTaskSarted() {
private void onShoutboxTaskStarted() {
Timber.i("Starting shoutbox task...");
progressBar.setVisibility(View.VISIBLE);
editorView.setVisibility(View.GONE);
}
private void onSendShoutTaskStarted() {

2
app/src/main/res/layout/fragment_shoutbox.xml

@ -30,7 +30,7 @@
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:paddingTop="8dp"
android:visibility="gone"/>
android:visibility="visible"/>
<gr.thmmy.mthmmy.views.editorview.EmojiKeyboard
android:id="@+id/emoji_keyboard"

Loading…
Cancel
Save