Skip to content

Commit

Permalink
feat(votebox): dont show results button if the poll has expired (#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Oct 31, 2024
1 parent 0d9186f commit 3a468dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion data/ui/widgets/votebox.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
</child>
<child>
<object class="GtkButton" id="button_refresh">
<property name="visible" bind-source="button_vote" bind-property="visible" bind-flags="sync-create|invert-boolean" />
<property name="label" translatable="yes">Refresh</property>
<property name="valign">center</property>
<signal name="clicked" handler="on_refresh_poll" swapped="no" />
Expand Down
1 change: 1 addition & 0 deletions src/Widgets/VoteBox.vala
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class Tuba.Widgets.VoteBox : Gtk.Box {
button_vote.sensitive = false;
button_vote.visible = !this.show_results && !poll.expired && !poll.voted;
button_results.visible = !poll.expired && !poll.voted;
button_refresh.visible = !button_vote.visible && !poll.expired;

if (this.show_results) {
button_results.icon_name = "tuba-eye-not-looking-symbolic";
Expand Down

0 comments on commit 3a468dd

Please sign in to comment.