Browse Source

fix bug where changing the orientation while guest would make

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

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

@ -105,6 +105,7 @@ public class ShoutboxFragment extends Fragment {
Timber.i("Shoutbox loaded successfully");
shoutAdapter.setShouts(shoutbox.getShouts());
shoutAdapter.notifyDataSetChanged();
editorView.setVisibility(shoutbox.getShoutSend() == null ? View.GONE : View.VISIBLE);
}
});
shoutboxViewModel.setOnShoutboxTaskStarted(this::onShoutboxTaskStarted);

2
app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxTask.java

@ -45,7 +45,7 @@ public class ShoutboxTask extends NewParseTask<Shoutbox> {
String formUrl = shoutboxForm.attr("action");
String sc = shoutboxForm.select("input[name=sc]").first().attr("value");
String shoutName = shoutboxForm.select("input[name=tp-shout-name]").first().attr("value");
// TODO: make shout send nullable and disable shouting
Element shoutSendInput = shoutboxForm.select("input[name=shout_send]").first();
String shoutSend = null;
if (shoutSendInput != null)

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="visible"/>
android:visibility="gone"/>
<gr.thmmy.mthmmy.views.editorview.EmojiKeyboard
android:id="@+id/emoji_keyboard"

Loading…
Cancel
Save