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
Marcel Hibbe
b140cc8751
wip: create poll using livedata
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
af427f8300
wip: create poll. show outgoing polls
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
0388f3e3f6
fix to show vote results if only "poll.votes" are available
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
d31a9b1ade
fix to send votes
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
5a070f5e1b
wip: view poll results
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
7d8aebe234
wip: vote on poll
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
81666829b5
fetch poll to set subtitle in message
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
ae80a4e2ad
pass roomToken to MessageViewHolders
...
wrap roomToken and ProfileBottomSheet in data class MessagePayload
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
c7e9721809
wip: get poll from API
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Álvaro Brey
42324419cd
wip: Poll view model work
...
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
01f18d7eca
add API poll details
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
e605546925
fix klint warnings
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
bf05445561
open poll dialog
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
f2025332ab
add data classes for polls (WIP)
...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
dependabot[bot]
b70fd95516
Bump exoplayer from 2.18.0 to 2.18.1
...
Bumps [exoplayer](https://github.com/google/ExoPlayer ) from 2.18.0 to 2.18.1.
- [Release notes](https://github.com/google/ExoPlayer/releases )
- [Changelog](https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md )
- [Commits](https://github.com/google/ExoPlayer/compare/r2.18.0...r2.18.1 )
---
updated-dependencies:
- dependency-name: com.google.android.exoplayer:exoplayer
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 19:51:22 +02:00
Andy Scherzinger
12efda5064
Merge pull request #2223 from nextcloud/chore/1549/roomMigration5
...
Migrate remaining controllers from requery to room
2022-07-22 19:50:51 +02:00
Andy Scherzinger
00f55f1949
use correct primary key to search for any other users in the DB and use current value from user attributes object
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 19:50:29 +02:00