Poll fixes (#1238)
* update cache when voting on a poll * fix poll controls color * don't allow voting on old poll from cache * check for RecyclerView.NO_POSITION in click listener * fix crash when voting in a boosted poll
This commit is contained in:
parent
fae9cd18f1
commit
b8c32a96de
7 changed files with 85 additions and 31 deletions
|
|
@ -431,6 +431,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 1" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -438,6 +439,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 2" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -445,6 +447,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 3" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -452,6 +455,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 4" />
|
||||
</RadioGroup>
|
||||
|
||||
|
|
@ -461,6 +465,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_radio_group"
|
||||
|
|
@ -472,6 +477,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_0"
|
||||
|
|
@ -483,6 +489,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_1"
|
||||
|
|
@ -494,6 +501,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_2"
|
||||
|
|
|
|||
|
|
@ -417,6 +417,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 1" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -424,6 +425,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 2" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -431,6 +433,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 3" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -438,6 +441,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 4" />
|
||||
</RadioGroup>
|
||||
|
||||
|
|
@ -447,6 +451,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_radio_group"
|
||||
|
|
@ -458,6 +463,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_0"
|
||||
|
|
@ -469,6 +475,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_1"
|
||||
|
|
@ -480,6 +487,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_2"
|
||||
|
|
|
|||
|
|
@ -426,6 +426,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 1" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -433,6 +434,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 2" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -440,6 +442,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 3" />
|
||||
|
||||
<RadioButton
|
||||
|
|
@ -447,6 +450,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
tools:text="Option 4" />
|
||||
</RadioGroup>
|
||||
|
||||
|
|
@ -456,6 +460,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_radio_group"
|
||||
|
|
@ -467,6 +472,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_0"
|
||||
|
|
@ -478,6 +484,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_1"
|
||||
|
|
@ -489,6 +496,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
app:buttonTint="?attr/compound_button_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_poll_checkbox_2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue