Marcel Hibbe
bfcab7cb49
fix copyright
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
b6d0d58cbe
reorder poll category in strings.xml
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
4b6a314514
remove unused viewState
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
4388d66b23
use CurrentUserProviderNew and User for polls
...
use CurrentUserProviderNew and User instead of CurrentUserProvider and UserEntity
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
41d64aa740
add copyrights
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
91fc3c311d
allow question to be multiline
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
feaf041685
fix cursor jumping to end when editing question
...
setting the cursor to the end was just a (buggy) workaround when the question was of type liveData. As it's not liveData anymore, this workaround was now useless
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
6b8c83f553
add dismiss button for edit votes mode
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
2ac1567f5d
delete empty options on poll creation
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
e77fb7cefb
fix lint warnings
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
9afe4e44d6
fix LiveData value assignment nullability mismatch
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
f10b76d430
check talk-polls capability
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
3b4be83ea7
calculate percent with voters instead votes
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
a8afb61745
always focus new empty poll option in poll create dialog
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
40f20c56d6
update poll UI for moderators etc
...
- allow to end poll for moderators
- allow to see voters amount for voting screen for moderators and creators of the poll
- replace UserEntity with User
- show numVoters instead of votes
- minor refactoring
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
c848659fda
fix text of submit button
...
+ rename variables
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
385d5ccd4a
fix copyrights
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
6ab5dace1c
fix layouts to handle poll with many options
...
make options scrollable
replace constraint layout with linear layouts + layout_weight="1"
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
cedbcaefee
fix percentage calculation for multiselect polls
...
for multiselect polls the total votes must be taken instead amount of voters (one voter can have more than 1 votes..)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
9e8dbb70f3
remove livedata where it's not needed
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
2988b667fe
solve detekt warnings 2
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
2b8ee4953b
solve detekt warnings
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
1b13812202
solve klint warnings
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
4c6e4b1c4c
add copyright headers
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
23bf072326
fix InstantiationException for more fragments
...
followup to a12692ec + get parentViewModel by ViewModelProvider
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
38256fc25d
fix compile error from commit a12692ec
...
(temporarily...)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
1a000859bf
fix InstantiationException for fragments
...
fragments must have a public, no-arg constructor.
extra information must be passed as arguments.
With a constructor that receives the data, the following error occurs:
Fragment$InstantiationException: Unable to instantiate fragment ..... could not find Fragment constructor
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
3224ae1e1f
improve klint score, minor refactoring
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
b347fbf1b5
rename close poll to end poll (in code)
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
bd99245c26
add confirm dialog to end poll
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
01f7016ae2
convert "votes" map
...
see https://github.com/nextcloud/spreed/pull/7500
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
73d48a395c
show detailed list of voters
...
+ refactoring adapter and viewholders for result screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
909ee07ce6
wip2: styling of poll bars
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
bddd6b2e8e
wip: styling of poll bars
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
318549a63a
wip: show user avatars for closed public polls
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
fb54b35cf0
rename close poll to end poll
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
6447b82969
disable vote button when selection is not changed compared to own votes
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
167aa43ca0
make own votes bold in result screen
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
a95c0d997b
make own votes bold in voting screen
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
782d74bfb9
restrict multiselection to maxVotes
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
a4c48b11d6
fix radiobuttons
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
2da4c37a52
remove liveData for selectedOptions
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
acda3d283b
add multiselect for poll options
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8541ebbfc0
add ability to close poll in PollVoteFragment
...
this adds duplicate button logic atm. might need to be improved..
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8c898404d1
move details text to PollMainViewModel
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
fbd5e5f5ed
show voting screen for open private polls
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
b504af1cd9
add UI logic + close poll system message
...
add close poll button (wip/temporarily?)
add "close poll" system message
add UI related logic to PollMainViewModel
add placeholder for pollDetails in UI
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
ea0b7d07cc
poll creation: add logic to enable/disable buttons
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8148bfaa65
add poll system message, klint fixes
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
9f90e9c4c6
wip: create poll using multiple livedata fields
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00