Browse Source

shoutbox bug fix (#69)

* fix bug where changing the orientation while guest would make
 EditorView visible

* +8dp shoutbox EditorView margin bottom
pull/70/head
oogee 5 years ago
committed by GitHub
parent
commit
23ff5493a2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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. 3
      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"); Timber.i("Shoutbox loaded successfully");
shoutAdapter.setShouts(shoutbox.getShouts()); shoutAdapter.setShouts(shoutbox.getShouts());
shoutAdapter.notifyDataSetChanged(); shoutAdapter.notifyDataSetChanged();
editorView.setVisibility(shoutbox.getShoutSend() == null ? View.GONE : View.VISIBLE);
} }
}); });
shoutboxViewModel.setOnShoutboxTaskStarted(this::onShoutboxTaskStarted); 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 formUrl = shoutboxForm.attr("action");
String sc = shoutboxForm.select("input[name=sc]").first().attr("value"); String sc = shoutboxForm.select("input[name=sc]").first().attr("value");
String shoutName = shoutboxForm.select("input[name=tp-shout-name]").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(); Element shoutSendInput = shoutboxForm.select("input[name=shout_send]").first();
String shoutSend = null; String shoutSend = null;
if (shoutSendInput != null) if (shoutSendInput != null)

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

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

Loading…
Cancel
Save