Commit Graph

70 Commits

Author SHA1 Message Date
mhmdanas 402990dd9d Fix false warning 2022-01-18 07:40:59 +03:00
Stypox 6cd25d7e55
Merge pull request #7412 from litetex/code-cleanup
Some code cleanup(s)
2021-11-23 08:59:34 +01:00
litetex 7638d229c0 Fixed typo 2021-11-15 20:24:40 +01:00
TacoTheDank a641c5bb58 Update Groupie to 2.9.0 2021-11-15 20:24:39 +01:00
litetex 1e0c9f46ad Improved highlighting in FeedFragment
Now keeps the ``selectableItemBackground`` when highligthing an item.
2021-11-15 20:22:23 +01:00
litetex 4eb02f584e Fixed default visibility of "new feed items" button
Fixed/Avoid NPEs
2021-11-15 20:22:22 +01:00
litetex 700c1b4b25 Removed unnecessary layout
Moved the feed button up a bit
2021-11-15 20:22:21 +01:00
litetex 4b4337e078 Used more understandable kotlin methods 2021-11-15 20:22:20 +01:00
litetex 38ce800685 Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
2021-11-15 20:22:20 +01:00
litetex 2310e8c1d6 Made ``hideNewItemsLoaded`` more null safe 2021-11-15 20:22:19 +01:00
litetex 1b2b3a4f88 Make new feed items bold 2021-11-15 20:22:18 +01:00
litetex 02789122a0 Implemented UI highlighting and "new feed items"-notification
Fixed format
2021-11-15 20:22:17 +01:00
Stypox 9e44053e22
Merge pull request #7160 from nschulzke/mark-as-watched-everywhere
Enable Mark as Watched in all the other playlist fragments.
2021-11-13 20:37:59 +01:00
Nathan Schulzke dee32c3dc5 Factor out shouldAddMarkAsWatched as a shared function 2021-11-13 10:18:17 -07:00
litetex adf9badbf6 Fixed toggle not in sync with list after app restart + refactored the code a bit 2021-11-11 19:46:15 +01:00
Baji Shaik 63291f8101 added show watched items toggle preference
default sharedpreference is used to persist and retrieve show watched menu option toggle state
2021-11-07 23:11:10 -05:00
litetex 272be36dd9 Removed ``e.printStacktrace`` and used an proper logger 2021-11-05 18:04:49 +01:00
TacoTheDank b61d44aaa6 Update Groupie to 2.9.0 2021-09-22 19:08:03 -04:00
z3r0r4 70354eb73e
Add play next to long press menu & refactor enqueue methods (#6872)
* added mvp play next button in long press menu; new intent handling, new long press dialog entry, new dialog functions, new strings

* changed line length for checkstyle pass

* cleaned comments, moved strings

* Update app/src/main/res/values/strings.xml

to make long press entry more descriptive

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>

* Update app/src/main/res/values/strings.xml

Co-authored-by: Stypox <stypox@pm.me>

* replace redundant nextOnVideoPlayer methods

Co-authored-by: Stypox <stypox@pm.me>

* add enqueueNextOnPlayer and enqueueOnPlayer without selectOnAppend and RESUME_PLAYBACK/ deprecate enqueueNextOn*Player and enqueueOn*Player methods
add getPlayerIntent, getPlayerEnqueueIntent and getPlayerEnqueueNextIntent without selectOnAppend and RESUME_PLAYBACK/ deprecate those with
add section comments

* removed deprecated methods
removed redundant methods

* removed deprecated methods
removed redundant methods

* replaced APPEND_ONLY, removed SELECT_ON_APPEND / replaced remaining enqueueOn*Player methods

* now works with playlists

* renamed dialog entry

* checking for >1 items in the queue using the PlayerHolder

* making enqueue*OnPlayer safe to call when no video is playing (defaulting to audio)

* corrected strings

* improve getQueueSize in PlayerHolder

* long press to enqueue only if queue isnt empty

* add Whitespace

Co-authored-by: Stypox <stypox@pm.me>

* clarify comments / add spaces

* PlayerType as parameter of the enqueueOnPlayer method
add Helper method

* using the helper function everywhere (except for the background and popup long-press actions (also on playlists, history, ...)), so basically nowhere
/ passing checkstyle

* assimilated the enqueue*OnPlayer methods

* removed redundant comment, variable

* simplify code line

Co-authored-by: Stypox <stypox@pm.me>

* move if

* replace workaround for isPlayerOpen()

Co-authored-by: Stypox <stypox@pm.me>

* replaced workarounds (getType), corrected static access with getInstance

* remove unused imports

* changed method call to original, new method doesnt exist yet.

* Use getter method instead of property access syntax.

* improve conditional for play next entry

Co-authored-by: Stypox <stypox@pm.me>

* show play next btn in feed fragment

Co-authored-by: Stypox <stypox@pm.me>

* add play next to local playlist and statistics fragment

Co-authored-by: Stypox <stypox@pm.me>

* formating

Co-authored-by: Stypox <stypox@pm.me>

* correcting logic

Co-authored-by: Stypox <stypox@pm.me>

* remove 2 year old unused string, formating

Co-authored-by: Stypox <stypox@pm.me>

* correct enqueue (next) conditionals, default to background if no player is open. Dont generally default to background play.

* remove player open checks from button long press enqueue actions

* improve log msg

* Rename next to enqueue_next

* Refactor kotlin

Co-authored-by: opusforlife2 <53176348+opusforlife2@users.noreply.github.com>
Co-authored-by: Stypox <stypox@pm.me>
2021-09-18 11:22:49 +02:00
Stypox 039bd5d413
Rename string finish to ok, as its content was "OK" 2021-08-30 16:36:57 +02:00
Stypox 2027b743b4
Merge pull request #6919 from ktprograms/channel-details-all-places
Add Show Channel Details where it's missing
2021-08-24 16:43:21 +02:00
TobiGr 8715e7dd98 Only show "mark as watched" context menu entry when watch history is enabled 2021-08-22 22:15:05 +02:00
ktprograms c248741c00 Add Show Channel Details to Subscription Feed & History 2021-08-13 17:04:10 +08:00
Stypox a3440cc8ef
Merge pull request #6814 from Stypox/channel-grid-span-count
Fix channel item span count for SubscriptionFragment
2021-08-05 14:25:39 +02:00
Stypox a9623f8e6a
Merge pull request #6550 from Douile/fix/clickthrough-feed-refresh
Disable feed click events while refresh overlay is shown
2021-08-01 13:11:24 +02:00
Stypox 644396149b
Fix channel item span count for SubscriptionFragment 2021-07-31 11:02:57 +02:00
Nathan Schulzke f451bdbfa4 Do not add Mark as Watched to a live stream. 2021-07-27 15:21:56 -06:00
Nathan Schulzke 2b41f710a8 Change played to watched 2021-07-27 13:26:51 -06:00
Nathan Schulzke 7fd2ebc252 Add ability to mark an item as played 2021-07-26 20:51:41 -06:00
Stypox 5ba3ef0a25
Fix grid span count calculation; remove duplicate methods 2021-07-19 20:47:50 +02:00
litetex 08d5dfa49c Removed updateRelativeTimeViews when the activity is paused
We don't need to call ``updateRelativeTimeViews`` when the activity is paused, because the user likely won't  notice it.
Despite that onResume already calls ``updateRelativeTimeViews`` so there is no need to do that twice.
2021-07-16 21:04:32 +02:00
Douile 2e053ea25a
Fix crash when refreshing feed 2021-07-11 03:00:32 +01:00
evermind 48c2c156cb convert PlayerHolder to Singleton, handle context within, bugfix ServiceConnection leak
- bugfix: have ServiceConnection created only once!

- select the context within the PlayerHolder to start, stop, bind or unbind the service
  -> we have to make sure the Service is started AND stopped within the same context
  -> so let PlayerHolder be the one to select the context

- remove removeListener() and replace the call with setListener(null)
- Compatibility: use ContextCompat.startForegroundService instead of startService()
2021-07-06 12:31:26 +02:00
Douile cb1a138140
#6081: Disable feed click handlers during refresh
This patch changes click handlers for feed (Whats new) so that they do
nothing while the feed is refreshing and the items being clicked are not
visible.
2021-06-22 19:42:20 +01:00
Stypox 32df4d39a4
Reshow feed if grid/list view mode changed 2021-06-15 18:40:25 +02:00
Stypox 7145b117cc
Fix long press menu in feed 2021-06-14 19:02:57 +02:00
Stypox 4698d07323
Do not hide feed buttons (show/hide & help) behind three-dots menu 2021-06-14 19:02:57 +02:00
Mauricio Colli e846f69e38
Add ability to hide played items in a feed
- Use components from the new Groupie list library for displaying the
feed list.
2021-06-09 15:53:51 +02:00
TobiGr b57ecae565 Fix getting error cause
Fix error dialog not shown when getting elemets from first subscription failed.
2021-06-08 10:12:36 +02:00
Stypox 89317d4abc Fix feed loading and show a dialog for each invalid subscription 2021-06-08 10:12:36 +02:00
TobiGr c5dd3dc7a9 Improve error message when loading feed
Add name of unavailable channel
2021-06-08 10:12:36 +02:00
TobiGr 6ad4b425e4 Better error handling of terminated channels when loading feed 2021-06-08 10:12:36 +02:00
Isira Seneviratne 74e20a8c52 Use PrettyTime's new formatUnrounded(OffsetDateTime) method.
Also change the types of the relevant variables from Calendar to OffsetDateTime.
2021-03-18 06:38:12 +05:30
Stypox aee0478235
FeedFragment: fix view binding and show loading indicator correctly 2021-03-12 23:21:54 +01:00
Stypox c43bca6007
Add report/solve-recaptcha button in error panel
It will be shown even when nothing could be loaded not due to a network error, and the user can choose to ignore or report it.

Also improve error reporting arguments
Also completely refactor error activity
Also improve some code here and there
2021-03-12 23:21:49 +01:00
Stypox 553b80164b
Move all error-related classes into error package 2021-03-07 17:49:28 +01:00
Stypox 10ec67854e
Fix number being shown instead of corresponding string resorce in feed 2021-01-20 10:44:44 +01:00
Stypox fa7613b8d1
Refactor feed fragment 2021-01-18 11:43:05 +01:00
Stypox d3d05d613d
Fix reload feed button does nothing
initListeners was being called before the bindings were assigned, and therefore the click listener was never setup
2021-01-18 11:42:25 +01:00
Isira Seneviratne 920e560b4b Convert AnimationUtils functions to extension functions. 2021-01-16 14:49:37 +05:30