Browse Source

minor fixes

pull/61/merge
Thodoris1999 6 years ago
parent
commit
89c01614b7
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxFragment.java

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

@ -94,6 +94,7 @@ public class ShoutboxFragment extends BaseFragment implements EmojiKeyboard.Emoj
swipeRefreshLayout = rootView.findViewById(R.id.swiperefresh); swipeRefreshLayout = rootView.findViewById(R.id.swiperefresh);
swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.primary); swipeRefreshLayout.setProgressBackgroundColorSchemeResource(R.color.primary);
swipeRefreshLayout.setColorSchemeResources(R.color.accent);
swipeRefreshLayout.setOnRefreshListener(() -> { swipeRefreshLayout.setOnRefreshListener(() -> {
shoutboxTask = new ShoutboxTask(ShoutboxFragment.this::onShoutboxTaskSarted, ShoutboxFragment.this::onShoutboxTaskFinished); shoutboxTask = new ShoutboxTask(ShoutboxFragment.this::onShoutboxTaskSarted, ShoutboxFragment.this::onShoutboxTaskFinished);
shoutboxTask.execute("https://www.thmmy.gr/smf/index.php?action=forum"); shoutboxTask.execute("https://www.thmmy.gr/smf/index.php?action=forum");
@ -105,6 +106,7 @@ public class ShoutboxFragment extends BaseFragment implements EmojiKeyboard.Emoj
InputConnection ic = editorView.getInputConnection(); InputConnection ic = editorView.getInputConnection();
setEmojiKeyboardInputConnection(ic); setEmojiKeyboardInputConnection(ic);
editorView.setOnSubmitListener(view -> { editorView.setOnSubmitListener(view -> {
if (shoutbox == null) return;
if (editorView.getText().toString().isEmpty()) { if (editorView.getText().toString().isEmpty()) {
editorView.setError("Required"); editorView.setError("Required");
return; return;

Loading…
Cancel
Save