-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashpay): add quick voting function (#1322)
* feat: update username voting screen * feat: add keys changes * feat: add keys errors * refactor: change vote system to return a tuple * refactor: change vote queries to use get_vote_polls * fix: improve Username Voting screen and voting * feature: add delete masternode key functionality (disabled) * fix: use withContext(Dispatchers.IO) * fix: add voting keys fixes * fix: fix vote click bug * fix: add vote key again * fix: prevent counting one vote as many * chore: log the wrong vote differently * fix: correct duplicate key detection * fix: fix request process state * fix: add tools:text for Results on * chore: remove commented code * fix: simplify Username Request vote button styles * fix: delete vote fix * feat: add OneVoteLeftDialog * feat: add blue lightning bolt next to Quick Voting * feat: add countVotes * fix: spacing and text on OneVoteLeftDialogFragment * feat: add new text for Quick Voting * feat: add isQuickVoting for BroadcastUsernameVotes* classes * feat: isApproved is based on the last vote * fix: update voteForAll functiom * fix: update voteForAll function * feat: add quick voting support to UsernameRequestsFragment * feat: improve username search in UsernameRequestsFragment * feat: improve username search in UsernameRequestsFragment * fix: keep track of normalized and regular labels * fix: some bugs resulting from removing mocking
- Loading branch information
1 parent
d7d53c3
commit 71ceae7
Showing
18 changed files
with
413 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="10dp" | ||
android:height="16dp" | ||
android:viewportWidth="10" | ||
android:viewportHeight="16"> | ||
<path | ||
android:pathData="M0.5,8.81C0.5,8.666 0.562,8.52 0.685,8.371L6.753,0.915C6.872,0.771 6.999,0.681 7.135,0.647C7.275,0.613 7.4,0.626 7.51,0.686C7.621,0.745 7.697,0.841 7.74,0.972C7.786,1.1 7.774,1.254 7.701,1.437L5.734,6.696H9.491C9.639,6.696 9.76,6.743 9.854,6.836C9.951,6.926 10,7.04 10,7.18C10,7.329 9.941,7.477 9.822,7.626L3.754,15.076C3.635,15.224 3.505,15.316 3.365,15.349C3.229,15.384 3.106,15.371 2.996,15.311C2.886,15.252 2.807,15.156 2.76,15.025C2.718,14.893 2.731,14.736 2.799,14.554L4.772,9.294H1.009C0.865,9.294 0.744,9.25 0.646,9.16C0.549,9.067 0.5,8.95 0.5,8.81Z" | ||
android:fillColor="#008DE4"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright 2023 Dash Core Group. | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<View | ||
android:id="@+id/drag_indicator" | ||
android:layout_width="35dp" | ||
android:layout_height="4dp" | ||
android:layout_gravity="center" | ||
android:layout_marginVertical="7dp" | ||
android:background="@drawable/rounded_background" | ||
android:theme="@style/DragIndicatorBackground" | ||
tools:background="@color/light_gray" /> | ||
|
||
<TextView | ||
style="@style/Headline5" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="17dp" | ||
android:gravity="center_horizontal" | ||
android:textAlignment="gravity" | ||
android:layout_marginHorizontal="20dp" | ||
android:text="@string/one_vote_left_title" /> | ||
|
||
<TextView | ||
android:id="@+id/subtitle" | ||
style="@style/Body2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="2dp" | ||
android:textAlignment="gravity" | ||
android:layout_marginHorizontal="20dp" | ||
android:text="@string/quick_vote_subtitle" /> | ||
|
||
<TextView | ||
android:id="@+id/show_usernames" | ||
style="@style/Caption.Medium.Blue" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="2dp" | ||
android:textAlignment="gravity" | ||
android:layout_marginHorizontal="20dp" | ||
android:text="@string/one_vote_left_show_usernames" /> | ||
|
||
<TextView | ||
android:id="@+id/username_list" | ||
style="@style/Body2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="6dp" | ||
android:textAlignment="gravity" | ||
android:layout_marginHorizontal="20dp" | ||
android:visibility="invisible" | ||
tools:visibility="visible" | ||
tools:text="@string/one_vote_left_username_examples" /> | ||
|
||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
android:layout_marginTop="30dp" | ||
android:layout_marginBottom="15dp"> | ||
|
||
<Button | ||
android:id="@+id/dismiss_btn" | ||
style="@style/Button.Primary.Large.Grey" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="15dp" | ||
android:layout_weight="1" | ||
android:text="@string/cancel" /> | ||
|
||
<Button | ||
android:id="@+id/ok_button" | ||
style="@style/Button.Primary.Large.Blue" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="10dp" | ||
android:layout_marginEnd="15dp" | ||
android:layout_weight="1" | ||
android:text="@string/button_ok" /> | ||
</LinearLayout> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.