Commit Graph

91 Commits

Author SHA1 Message Date
TacoTheDank 51837ce36f Get rid of setUserVisibleHint 2021-10-16 15:33:45 -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 fcef783bbb
Replace UniversalImageLoader with Picasso 2021-08-24 10:56:25 +02:00
TacoTheDank 79deff3261 Annotate some overridden methods and parameters as NonNull 2021-06-19 18:37:02 -04:00
TiA4f8R d6decc05d7
Move some classes to a new subpackage and adress requested changes
Rename URLHandler and KoreUtil classes to InternalUrlsHandler and KoreUtils.
Move InternalUrlsHandler, KoreUtils, TextLinkfier, ShareUtils classes to external_communication subpackage.
Remove unused param showPreviewText in shareText method of ShareUtils class.
Add initial work to be able to display an image preview of the content shared (not for downloads).
Use a better regular expression to parse timestamps in plain text descriptions.
2021-06-11 12:12:02 +02:00
TiA4f8R d85afd6435
Initial work to add the image of the content in the share sheet
Also do some fixes when sharing a file in downloads and some improvements in JavaDocs of ShareUtils class.
2021-06-11 12:12:00 +02:00
camo0112 8f9eaa22e6 Fix display of channel details when it has no videos 2021-04-09 12:45:43 +05:30
Stypox 463dd8ea74
Completely remove return activity, now outdated 2021-03-12 23:21:54 +01:00
Stypox 1fc8e4c148
Optimize imports and solve checkstyle issues 2021-03-12 23:21:53 +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 327fc742d3
Fix channel subscribe button causing crash in main page tab
The binding was being set to null on onDestroyView() instead of in onDestroy()
2021-01-21 15:31:50 +01:00
Stypox a314f55a17
Move description to a tab alongside related streams and comments 2021-01-17 15:26:25 +01:00
TiA4f8R 79e98db3bd
Apply the requested changes and little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.

Apply the requested changes and do little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.
2021-01-16 13:23:42 +01:00
TiA4f8R a57fd69fb4
External sharing improvements
Improve NewPipe's share on some devices + fix crash when no browser is set on some devices

Catching ActivityNotFoundException when trying to open the default browser
Use an ACTION_CHOOSER intent and put as an extra intent the intent to
open an URI / share an URI when no default app is set.

Add a LinkHelper class which set a custom action when clicking web links
in the description of a content. This class also helps to implement a confirmation dialog when trying to open web links in an external app.
2021-01-16 13:23:06 +01:00
Isira Seneviratne 920e560b4b Convert AnimationUtils functions to extension functions. 2021-01-16 14:49:37 +05:30
Isira Seneviratne 6039484a02 Use view binding in ChannelFragment. 2021-01-14 11:16:03 +05:30
Isira Seneviratne 979102a2d9 Return ViewBinding instead of View in BaseListFragment's getListHeader() and getListFooter() methods. 2021-01-14 11:15:57 +05:30
Stypox f0ca916432
Update most dependencies 2020-11-22 14:03:10 +01:00
Stypox 1d42e45d78
Unify all ways of opening VideoDetailFragment 2020-11-08 10:00:27 +01:00
Isira Seneviratne b0b0a75c87 Use Collection.removeIf() instead of using Iterator.remove() to remove elements conditionally. 2020-11-01 14:44:07 +05:30
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
wb9688 5fd7ae33b4 Replace getFragmentManager() with getFM() 2020-08-03 14:47:10 +02:00
Avently d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
wb9688 dd57e246b8 Use getNextPage() instead of getNextPageUrl() 2020-07-07 21:03:24 +02:00
bopol 375e18bec8 subscribe button now match service's main color 2020-05-11 19:29:34 +02:00
wb9688 ae437b1510 Bump NewPipeExtractor 2020-05-08 18:07:52 +02:00
wb9688 235394d96c Don't show sub-channel thumbnail by default 2020-05-08 15:51:21 +02:00
Roy Yosef cc8874b687 Fix PR review
Make all of the uploader section on stream page navigate to the channel page
Extract hard coded strings
Remove redundant spaces
Fix open streams from a channel
Rename "ParentChannel" to "SubChannel"
Config royosef:NewPipeExtractor in app/build.gradle
2020-05-07 20:40:17 +02:00
Roy Yosef 2d0bc05488 Add sub-channel details to channel fragment 2020-05-07 20:39:32 +02:00
Stypox 34aa3d3e00
Enqueue on long click on background/popup in channel 2020-04-19 10:34:07 +02:00
bopol 4c128d837c handle ContentNotSupportedException for Channel Fragment (when an user has no video tab) 2020-04-10 09:12:29 +02:00
wb9688 63bcc04eff Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Mauricio Colli b4cabe23e3
Handle content not available exception more comprehensively 2020-03-28 14:54:52 -03:00
Mauricio Colli 20a4bb0936
Implement new feed and subscriptions groups
- Introduce Groupie for easier lists implementations
- Use some of the new components of the Android Architecture libraries
- Add a bunch of icons for groups, using vectors, which still is
compatible with older APIs through the compatibility layer
2020-03-14 00:12:31 -03:00
Stypox c7b4705538
Implement Settings buttons 2020-02-22 10:36:10 +01:00
bopol f089cd027e Multiple localization fixes
With the extractor PR, fixes title & description shown in the wrong language.
Fixed views / spectators counts possibly in the wrong language
Fixed live spectators not showing full count on detail page
Fixed LIVE shown on players, it shows translated instead

Fixed Videos string in search / three dots not available in Weblate
(because it was videos, but there already was a plural string named videos, in Weblate)

Subscriber count is always giving the short count.
We can't get exact number since this YouTube update: https://support.google.com/youtube/thread/6543166
But only short count (B, M, k), so showing full number, eg for 1.9M: 1,900,000, is wrong because the number could be 1,923,490 or 1,897,789…

Added a « sytem default » option to content language and country language selector.
It's the one selected by default (not en-GB anymore then), and correspond to the
language of the system / country of the system
By system I mean phone, tablet, TV…

Fixed russian showing - before time ago (eg 19hrs ago)
This is a workaround fix, I opened an issue on prettytime library repo.

Fixed russian plurals:
other was used instead of many for videos and subscribers

Fixed seek_duration english only
2020-02-15 12:40:23 +01:00
Avently 4c57893312 New features and fixes
- added autoplay options inside settings: always, only on wifi, never
- now statusbar will be shown in fullscreen mode
- playlists, channels can be autoplayed too (if enabled)
- changed title of background activity to Play queue
- fixed a crash
2020-01-08 19:16:50 +03:00
yausername 17c5e73994
null check on share 2019-12-03 02:04:52 +05:30
TobiGr 0fb7eab2f9 Fix code formatting 2019-11-23 20:04:40 +01:00
yausername b6be586766 merged upstream/dev 2019-11-16 04:37:14 +05:30
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Stypox d076fe72cd
Optimize imports in edited files 2019-07-25 11:47:38 +02:00
Stypox 064f0e414a
Merge branch 'dev' into menu-consistency 2019-07-21 11:11:06 +02:00
Stypox 6f028ecb19
Remove unused imports from modified files 2019-05-29 20:45:05 +02:00
Stypox bdb1be9967
Remove useless overrides of showStreamDialog
They were exactly the same as the base class function
2019-05-29 20:25:44 +02:00
Stypox 8b584f3922
Make long-press menu consistent across views: fix #2354
Also made the code that creates the menus consistent across files.
2019-05-29 16:22:01 +02:00
Vasiliy 4e1423d224
Implement playback state management 2019-04-13 13:34:36 +03:00
Stypox aadc8168be
Remove share utilities from BaseStateFragment
Replaced by ShareUtils
2019-04-06 20:17:04 +02:00