Merge pull request #2927 from Bnyro/master

Minor repo structure cleanup
This commit is contained in:
Bnyro 2023-01-31 16:44:32 +01:00 committed by GitHub
commit f4c7a0b080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
95 changed files with 155 additions and 147 deletions

View File

@ -13,11 +13,11 @@ import com.github.libretube.constants.DOWNLOAD_CHANNEL_ID
import com.github.libretube.constants.PUSH_CHANNEL_ID import com.github.libretube.constants.PUSH_CHANNEL_ID
import com.github.libretube.db.DatabaseHolder import com.github.libretube.db.DatabaseHolder
import com.github.libretube.util.ExceptionHandler import com.github.libretube.util.ExceptionHandler
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NotificationHelper import com.github.libretube.helpers.NotificationHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.ProxyHelper import com.github.libretube.helpers.ProxyHelper
import com.github.libretube.util.ShortcutHelper import com.github.libretube.helpers.ShortcutHelper
class LibreTubeApp : Application() { class LibreTubeApp : Application() {
override fun onCreate() { override fun onCreate() {

View File

@ -17,9 +17,8 @@ import com.github.libretube.extensions.toLocalPlaylistItem
import com.github.libretube.extensions.toStreamItem import com.github.libretube.extensions.toStreamItem
import com.github.libretube.extensions.toastFromMainThread import com.github.libretube.extensions.toastFromMainThread
import com.github.libretube.obj.ImportPlaylist import com.github.libretube.obj.ImportPlaylist
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.ProxyHelper import com.github.libretube.helpers.ProxyHelper
import gen._base._base_java__assetres.srcjar.R.id.async
import java.io.IOException import java.io.IOException
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async

View File

@ -2,7 +2,7 @@ package com.github.libretube.api
import com.github.libretube.constants.PIPED_API_URL import com.github.libretube.constants.PIPED_API_URL
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory
import okhttp3.MediaType.Companion.toMediaType import okhttp3.MediaType.Companion.toMediaType
import retrofit2.Retrofit import retrofit2.Retrofit

View File

@ -10,7 +10,7 @@ import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.db.DatabaseHolder.Companion.Database import com.github.libretube.db.DatabaseHolder.Companion.Database
import com.github.libretube.db.obj.LocalSubscription import com.github.libretube.db.obj.LocalSubscription
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking

View File

@ -7,7 +7,7 @@ import com.github.libretube.db.obj.SearchHistoryItem
import com.github.libretube.db.obj.WatchHistoryItem import com.github.libretube.db.obj.WatchHistoryItem
import com.github.libretube.extensions.query import com.github.libretube.extensions.query
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
object DatabaseHelper { object DatabaseHelper {
private const val MAX_SEARCH_HISTORY_SIZE = 20 private const val MAX_SEARCH_HISTORY_SIZE = 20

View File

@ -3,7 +3,7 @@ package com.github.libretube.extensions
import com.github.libretube.api.obj.StreamItem import com.github.libretube.api.obj.StreamItem
import com.github.libretube.api.obj.Streams import com.github.libretube.api.obj.Streams
import com.github.libretube.db.obj.LocalPlaylistItem import com.github.libretube.db.obj.LocalPlaylistItem
import com.github.libretube.util.ProxyHelper import com.github.libretube.helpers.ProxyHelper
fun Streams.toStreamItem(videoId: String): StreamItem { fun Streams.toStreamItem(videoId: String): StreamItem {
return StreamItem( return StreamItem(

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.media.AudioManager import android.media.AudioManager

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.ActivityManager import android.app.ActivityManager
import android.content.Context import android.content.Context

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.Activity import android.app.Activity
import android.view.WindowManager import android.view.WindowManager

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.ClipData import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import com.github.libretube.api.obj.PipedStream import com.github.libretube.api.obj.PipedStream
import com.github.libretube.api.obj.Streams import com.github.libretube.api.obj.Streams

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.graphics.Bitmap import android.graphics.Bitmap
@ -13,6 +13,7 @@ import coil.request.CachePolicy
import coil.request.ImageRequest import coil.request.ImageRequest
import com.github.libretube.api.CronetHelper import com.github.libretube.api.CronetHelper
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.util.DataSaverMode
import java.io.File import java.io.File
import java.io.FileOutputStream import java.io.FileOutputStream
import okio.use import okio.use

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.Activity import android.app.Activity
import android.net.Uri import android.net.Uri

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.content.res.Configuration import android.content.res.Configuration

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.util.Log import android.util.Log

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.NotificationManager import android.app.NotificationManager
import android.content.Context import android.content.Context

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.net.ConnectivityManager import android.net.ConnectivityManager

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import androidx.work.Constraints import androidx.work.Constraints

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.Activity import android.app.Activity
import android.app.PendingIntent import android.app.PendingIntent

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import com.github.libretube.api.RetrofitInstance import com.github.libretube.api.RetrofitInstance
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.app.Activity import android.app.Activity
import android.content.ComponentName import android.content.ComponentName

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.helpers
import android.os.Build import android.os.Build
import android.view.WindowManager import android.view.WindowManager

View File

@ -30,8 +30,8 @@ import com.github.libretube.extensions.query
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.extensions.toStreamItem import com.github.libretube.extensions.toStreamItem
import com.github.libretube.util.NowPlayingNotification import com.github.libretube.util.NowPlayingNotification
import com.github.libretube.util.PlayerHelper import com.github.libretube.helpers.PlayerHelper
import com.github.libretube.util.PlayerHelper.loadPlaybackParams import com.github.libretube.helpers.PlayerHelper.loadPlaybackParams
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.MediaItem import com.google.android.exoplayer2.MediaItem

View File

@ -30,9 +30,9 @@ import com.github.libretube.receivers.NotificationReceiver
import com.github.libretube.receivers.NotificationReceiver.Companion.ACTION_DOWNLOAD_PAUSE import com.github.libretube.receivers.NotificationReceiver.Companion.ACTION_DOWNLOAD_PAUSE
import com.github.libretube.receivers.NotificationReceiver.Companion.ACTION_DOWNLOAD_RESUME import com.github.libretube.receivers.NotificationReceiver.Companion.ACTION_DOWNLOAD_RESUME
import com.github.libretube.ui.activities.MainActivity import com.github.libretube.ui.activities.MainActivity
import com.github.libretube.util.DownloadHelper import com.github.libretube.helpers.DownloadHelper
import com.github.libretube.util.DownloadHelper.getNotificationId import com.github.libretube.helpers.DownloadHelper.getNotificationId
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import java.io.File import java.io.File
import java.net.HttpURLConnection import java.net.HttpURLConnection
import java.net.SocketTimeoutException import java.net.SocketTimeoutException

View File

@ -11,7 +11,7 @@ import android.os.Environment
import android.os.IBinder import android.os.IBinder
import android.widget.Toast import android.widget.Toast
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.DownloadHelper import com.github.libretube.helpers.DownloadHelper
import java.io.File import java.io.File
class UpdateService : Service() { class UpdateService : Service() {

View File

@ -36,12 +36,12 @@ import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.ui.models.SearchViewModel import com.github.libretube.ui.models.SearchViewModel
import com.github.libretube.ui.models.SubscriptionsViewModel import com.github.libretube.ui.models.SubscriptionsViewModel
import com.github.libretube.ui.tools.SleepTimer import com.github.libretube.ui.tools.SleepTimer
import com.github.libretube.util.NavBarHelper import com.github.libretube.helpers.NavBarHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.NetworkHelper import com.github.libretube.helpers.NetworkHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
import com.github.libretube.util.WindowHelper import com.github.libretube.helpers.WindowHelper
import com.google.android.material.elevation.SurfaceColors import com.google.android.material.elevation.SurfaceColors
class MainActivity : BaseActivity() { class MainActivity : BaseActivity() {

View File

@ -8,8 +8,8 @@ import com.github.libretube.R
import com.github.libretube.databinding.ActivityNointernetBinding import com.github.libretube.databinding.ActivityNointernetBinding
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.fragments.DownloadsFragment import com.github.libretube.ui.fragments.DownloadsFragment
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.NetworkHelper import com.github.libretube.helpers.NetworkHelper
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
class NoInternetActivity : BaseActivity() { class NoInternetActivity : BaseActivity() {

View File

@ -19,9 +19,9 @@ import com.github.libretube.extensions.updateParameters
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.extensions.setAspectRatio import com.github.libretube.ui.extensions.setAspectRatio
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.util.PlayerHelper import com.github.libretube.helpers.PlayerHelper
import com.github.libretube.util.PlayerHelper.loadPlaybackParams import com.github.libretube.helpers.PlayerHelper.loadPlaybackParams
import com.github.libretube.util.WindowHelper import com.github.libretube.helpers.WindowHelper
import com.google.android.exoplayer2.C import com.google.android.exoplayer2.C
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.MediaItem import com.google.android.exoplayer2.MediaItem

View File

@ -8,7 +8,7 @@ import android.util.Log
import com.github.libretube.constants.IntentData import com.github.libretube.constants.IntentData
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
class RouterActivity : BaseActivity() { class RouterActivity : BaseActivity() {

View File

@ -8,8 +8,8 @@ import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.api.obj.ChapterSegment import com.github.libretube.api.obj.ChapterSegment
import com.github.libretube.databinding.ChapterColumnBinding import com.github.libretube.databinding.ChapterColumnBinding
import com.github.libretube.ui.viewholders.ChaptersViewHolder import com.github.libretube.ui.viewholders.ChaptersViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
class ChaptersAdapter( class ChaptersAdapter(

View File

@ -21,11 +21,11 @@ import com.github.libretube.databinding.CommentsRowBinding
import com.github.libretube.extensions.formatShort import com.github.libretube.extensions.formatShort
import com.github.libretube.ui.fragments.CommentsRepliesFragment import com.github.libretube.ui.fragments.CommentsRepliesFragment
import com.github.libretube.ui.viewholders.CommentsViewHolder import com.github.libretube.ui.viewholders.CommentsViewHolder
import com.github.libretube.util.ClipboardHelper import com.github.libretube.helpers.ClipboardHelper
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
class CommentsAdapter( class CommentsAdapter(
private val fragment: Fragment?, private val fragment: Fragment?,

View File

@ -16,7 +16,7 @@ import com.github.libretube.extensions.formatAsFileSize
import com.github.libretube.extensions.query import com.github.libretube.extensions.query
import com.github.libretube.ui.activities.OfflinePlayerActivity import com.github.libretube.ui.activities.OfflinePlayerActivity
import com.github.libretube.ui.viewholders.DownloadsViewHolder import com.github.libretube.ui.viewholders.DownloadsViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.File import java.io.File

View File

@ -9,8 +9,8 @@ import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.databinding.AppIconItemBinding import com.github.libretube.databinding.AppIconItemBinding
import com.github.libretube.ui.viewholders.IconsSheetViewHolder import com.github.libretube.ui.viewholders.IconsSheetViewHolder
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
class IconsSheetAdapter : RecyclerView.Adapter<IconsSheetViewHolder>() { class IconsSheetAdapter : RecyclerView.Adapter<IconsSheetViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): IconsSheetViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): IconsSheetViewHolder {

View File

@ -8,8 +8,8 @@ import com.github.libretube.extensions.toID
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.sheets.ChannelOptionsBottomSheet import com.github.libretube.ui.sheets.ChannelOptionsBottomSheet
import com.github.libretube.ui.viewholders.LegacySubscriptionViewHolder import com.github.libretube.ui.viewholders.LegacySubscriptionViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
class LegacySubscriptionAdapter( class LegacySubscriptionAdapter(
private val subscriptions: List<com.github.libretube.api.obj.Subscription> private val subscriptions: List<com.github.libretube.api.obj.Subscription>

View File

@ -9,9 +9,9 @@ import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.databinding.QueueRowBinding import com.github.libretube.databinding.QueueRowBinding
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.ui.viewholders.PlayingQueueViewHolder import com.github.libretube.ui.viewholders.PlayingQueueViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
class PlayingQueueAdapter : RecyclerView.Adapter<PlayingQueueViewHolder>() { class PlayingQueueAdapter : RecyclerView.Adapter<PlayingQueueViewHolder>() {

View File

@ -18,8 +18,8 @@ import com.github.libretube.ui.extensions.setFormattedDuration
import com.github.libretube.ui.extensions.setWatchProgressLength import com.github.libretube.ui.extensions.setWatchProgressLength
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
import com.github.libretube.ui.viewholders.PlaylistViewHolder import com.github.libretube.ui.viewholders.PlaylistViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import java.io.IOException import java.io.IOException
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View File

@ -14,8 +14,8 @@ import com.github.libretube.enums.PlaylistType
import com.github.libretube.extensions.query import com.github.libretube.extensions.query
import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet
import com.github.libretube.ui.viewholders.PlaylistBookmarkViewHolder import com.github.libretube.ui.viewholders.PlaylistBookmarkViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
class PlaylistBookmarkAdapter( class PlaylistBookmarkAdapter(
private val bookmarks: List<PlaylistBookmark>, private val bookmarks: List<PlaylistBookmark>,

View File

@ -11,8 +11,8 @@ import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.dialogs.DeletePlaylistDialog import com.github.libretube.ui.dialogs.DeletePlaylistDialog
import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet
import com.github.libretube.ui.viewholders.PlaylistsViewHolder import com.github.libretube.ui.viewholders.PlaylistsViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
class PlaylistsAdapter( class PlaylistsAdapter(
private val playlists: MutableList<Playlists>, private val playlists: MutableList<Playlists>,

View File

@ -21,8 +21,8 @@ import com.github.libretube.ui.sheets.ChannelOptionsBottomSheet
import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
import com.github.libretube.ui.viewholders.SearchViewHolder import com.github.libretube.ui.viewholders.SearchViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
class SearchAdapter( class SearchAdapter(

View File

@ -10,8 +10,8 @@ import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.extensions.setupSubscriptionButton import com.github.libretube.ui.extensions.setupSubscriptionButton
import com.github.libretube.ui.sheets.ChannelOptionsBottomSheet import com.github.libretube.ui.sheets.ChannelOptionsBottomSheet
import com.github.libretube.ui.viewholders.SubscriptionChannelViewHolder import com.github.libretube.ui.viewholders.SubscriptionChannelViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
class SubscriptionChannelAdapter( class SubscriptionChannelAdapter(
private val subscriptions: MutableList<Subscription> private val subscriptions: MutableList<Subscription>

View File

@ -25,9 +25,9 @@ import com.github.libretube.ui.extensions.setFormattedDuration
import com.github.libretube.ui.extensions.setWatchProgressLength import com.github.libretube.ui.extensions.setWatchProgressLength
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
import com.github.libretube.ui.viewholders.VideosViewHolder import com.github.libretube.ui.viewholders.VideosViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
class VideosAdapter( class VideosAdapter(

View File

@ -13,8 +13,8 @@ import com.github.libretube.ui.extensions.setFormattedDuration
import com.github.libretube.ui.extensions.setWatchProgressLength import com.github.libretube.ui.extensions.setWatchProgressLength
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
import com.github.libretube.ui.viewholders.WatchHistoryViewHolder import com.github.libretube.ui.viewholders.WatchHistoryViewHolder
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
class WatchHistoryAdapter( class WatchHistoryAdapter(
private val watchHistory: MutableList<WatchHistoryItem> private val watchHistory: MutableList<WatchHistoryItem>

View File

@ -2,8 +2,8 @@ package com.github.libretube.ui.base
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import com.github.libretube.util.LocaleHelper import com.github.libretube.helpers.LocaleHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
/** /**
* Activity that applies the LibreTube theme and the in-app language * Activity that applies the LibreTube theme and the in-app language

View File

@ -8,7 +8,7 @@ import androidx.preference.PreferenceFragmentCompat
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.databinding.DialogTextPreferenceBinding import com.github.libretube.databinding.DialogTextPreferenceBinding
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
/** /**

View File

@ -9,7 +9,7 @@ import com.github.libretube.R
import com.github.libretube.db.DatabaseHolder.Companion.Database import com.github.libretube.db.DatabaseHolder.Companion.Database
import com.github.libretube.obj.BackupFile import com.github.libretube.obj.BackupFile
import com.github.libretube.obj.PreferenceItem import com.github.libretube.obj.PreferenceItem
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch

View File

@ -12,7 +12,7 @@ import com.github.libretube.api.RetrofitInstance
import com.github.libretube.api.obj.DeleteUserRequest import com.github.libretube.api.obj.DeleteUserRequest
import com.github.libretube.databinding.DialogDeleteAccountBinding import com.github.libretube.databinding.DialogDeleteAccountBinding
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class DeleteAccountDialog : DialogFragment() { class DeleteAccountDialog : DialogFragment() {

View File

@ -11,7 +11,7 @@ import com.github.libretube.api.obj.PlaylistId
import com.github.libretube.db.DatabaseHolder import com.github.libretube.db.DatabaseHolder
import com.github.libretube.enums.PlaylistType import com.github.libretube.enums.PlaylistType
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch

View File

@ -15,7 +15,7 @@ import com.github.libretube.api.RetrofitInstance
import com.github.libretube.api.obj.Streams import com.github.libretube.api.obj.Streams
import com.github.libretube.databinding.DialogDownloadBinding import com.github.libretube.databinding.DialogDownloadBinding
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.util.DownloadHelper import com.github.libretube.helpers.DownloadHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.IOException import java.io.IOException

View File

@ -6,8 +6,8 @@ import android.os.Bundle
import android.widget.Toast import android.widget.Toast
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.ClipboardHelper import com.github.libretube.helpers.ClipboardHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class ErrorDialog : DialogFragment() { class ErrorDialog : DialogFragment() {

View File

@ -12,7 +12,7 @@ import com.github.libretube.api.RetrofitInstance
import com.github.libretube.api.obj.Login import com.github.libretube.api.obj.Login
import com.github.libretube.databinding.DialogLoginBinding import com.github.libretube.databinding.DialogLoginBinding
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder

View File

@ -8,7 +8,7 @@ import androidx.core.app.ActivityCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.databinding.DialogLogoutBinding import com.github.libretube.databinding.DialogLogoutBinding
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class LogoutDialog : DialogFragment() { class LogoutDialog : DialogFragment() {

View File

@ -9,7 +9,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.databinding.DialogNavbarOptionsBinding import com.github.libretube.databinding.DialogNavbarOptionsBinding
import com.github.libretube.ui.adapters.NavBarOptionsAdapter import com.github.libretube.ui.adapters.NavBarOptionsAdapter
import com.github.libretube.util.NavBarHelper import com.github.libretube.helpers.NavBarHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class NavBarOptionsDialog : DialogFragment() { class NavBarOptionsDialog : DialogFragment() {

View File

@ -5,7 +5,7 @@ import android.os.Bundle
import androidx.core.app.ActivityCompat import androidx.core.app.ActivityCompat
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class RequireRestartDialog : DialogFragment() { class RequireRestartDialog : DialogFragment() {

View File

@ -14,7 +14,7 @@ import com.github.libretube.db.DatabaseHolder.Companion.Database
import com.github.libretube.enums.ShareObjectType import com.github.libretube.enums.ShareObjectType
import com.github.libretube.extensions.awaitQuery import com.github.libretube.extensions.awaitQuery
import com.github.libretube.obj.ShareData import com.github.libretube.obj.ShareData
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class ShareDialog( class ShareDialog(

View File

@ -1,7 +1,7 @@
package com.github.libretube.ui.extensions package com.github.libretube.ui.extensions
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.button.MaterialButton import com.google.android.material.button.MaterialButton
fun MaterialButton.setupNotificationBell(channelId: String) { fun MaterialButton.setupNotificationBell(channelId: String) {

View File

@ -26,9 +26,9 @@ import com.github.libretube.ui.dialogs.ShareDialog
import com.github.libretube.ui.sheets.PlaybackOptionsSheet import com.github.libretube.ui.sheets.PlaybackOptionsSheet
import com.github.libretube.ui.sheets.PlayingQueueSheet import com.github.libretube.ui.sheets.PlayingQueueSheet
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
import com.github.libretube.util.BackgroundHelper import com.github.libretube.helpers.BackgroundHelper
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
class AudioPlayerFragment : BaseFragment() { class AudioPlayerFragment : BaseFragment() {

View File

@ -26,7 +26,7 @@ import com.github.libretube.ui.adapters.VideosAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.dialogs.ShareDialog import com.github.libretube.ui.dialogs.ShareDialog
import com.github.libretube.ui.extensions.setupSubscriptionButton import com.github.libretube.ui.extensions.setupSubscriptionButton
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import java.io.IOException import java.io.IOException
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View File

@ -25,7 +25,7 @@ import com.github.libretube.services.DownloadService
import com.github.libretube.ui.adapters.DownloadsAdapter import com.github.libretube.ui.adapters.DownloadsAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.viewholders.DownloadsViewHolder import com.github.libretube.ui.viewholders.DownloadsViewHolder
import com.github.libretube.util.DownloadHelper import com.github.libretube.helpers.DownloadHelper
import java.io.File import java.io.File
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.collectLatest

View File

@ -22,7 +22,7 @@ import com.github.libretube.ui.adapters.PlaylistBookmarkAdapter
import com.github.libretube.ui.adapters.PlaylistsAdapter import com.github.libretube.ui.adapters.PlaylistsAdapter
import com.github.libretube.ui.adapters.VideosAdapter import com.github.libretube.ui.adapters.VideosAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.util.LocaleHelper import com.github.libretube.helpers.LocaleHelper
import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch

View File

@ -26,8 +26,8 @@ import com.github.libretube.ui.adapters.PlaylistsAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.dialogs.CreatePlaylistDialog import com.github.libretube.ui.dialogs.CreatePlaylistDialog
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.util.NavBarHelper import com.github.libretube.helpers.NavBarHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class LibraryFragment : BaseFragment() { class LibraryFragment : BaseFragment() {

View File

@ -86,19 +86,19 @@ import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.ui.sheets.BaseBottomSheet import com.github.libretube.ui.sheets.BaseBottomSheet
import com.github.libretube.ui.sheets.CommentsSheet import com.github.libretube.ui.sheets.CommentsSheet
import com.github.libretube.ui.sheets.PlayingQueueSheet import com.github.libretube.ui.sheets.PlayingQueueSheet
import com.github.libretube.util.BackgroundHelper import com.github.libretube.helpers.BackgroundHelper
import com.github.libretube.util.DashHelper import com.github.libretube.helpers.DashHelper
import com.github.libretube.util.DataSaverMode import com.github.libretube.util.DataSaverMode
import com.github.libretube.util.HtmlParser import com.github.libretube.util.HtmlParser
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.LinkHandler import com.github.libretube.util.LinkHandler
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.NowPlayingNotification import com.github.libretube.util.NowPlayingNotification
import com.github.libretube.util.PlayerHelper import com.github.libretube.helpers.PlayerHelper
import com.github.libretube.util.PlayerHelper.loadPlaybackParams import com.github.libretube.helpers.PlayerHelper.loadPlaybackParams
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.SeekbarPreviewListener import com.github.libretube.ui.listeners.SeekbarPreviewListener
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils
import com.google.android.exoplayer2.C import com.google.android.exoplayer2.C
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer

View File

@ -31,8 +31,8 @@ import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.extensions.serializable import com.github.libretube.ui.extensions.serializable
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet import com.github.libretube.ui.sheets.PlaylistOptionsBottomSheet
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.TextUtils import com.github.libretube.util.TextUtils

View File

@ -18,7 +18,7 @@ import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.hideKeyboard import com.github.libretube.extensions.hideKeyboard
import com.github.libretube.ui.adapters.SearchAdapter import com.github.libretube.ui.adapters.SearchAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import java.io.IOException import java.io.IOException
import retrofit2.HttpException import retrofit2.HttpException

View File

@ -19,7 +19,7 @@ import com.github.libretube.ui.adapters.VideosAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.models.SubscriptionsViewModel import com.github.libretube.ui.models.SubscriptionsViewModel
import com.github.libretube.ui.sheets.BaseBottomSheet import com.github.libretube.ui.sheets.BaseBottomSheet
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class SubscriptionsFragment : BaseFragment() { class SubscriptionsFragment : BaseFragment() {
private lateinit var binding: FragmentSubscriptionsBinding private lateinit var binding: FragmentSubscriptionsBinding

View File

@ -15,7 +15,7 @@ import com.github.libretube.extensions.TAG
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.ui.adapters.VideosAdapter import com.github.libretube.ui.adapters.VideosAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.util.LocaleHelper import com.github.libretube.helpers.LocaleHelper
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import java.io.IOException import java.io.IOException
import retrofit2.HttpException import retrofit2.HttpException

View File

@ -22,9 +22,9 @@ import com.github.libretube.extensions.query
import com.github.libretube.ui.adapters.WatchHistoryAdapter import com.github.libretube.ui.adapters.WatchHistoryAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.ProxyHelper import com.github.libretube.helpers.ProxyHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class WatchHistoryFragment : BaseFragment() { class WatchHistoryFragment : BaseFragment() {

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.ui.listeners
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.res.Configuration import android.content.res.Configuration
@ -15,6 +15,7 @@ import androidx.core.os.postDelayed
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.interfaces.PlayerGestureOptions import com.github.libretube.ui.interfaces.PlayerGestureOptions
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.helpers.PlayerHelper
import kotlin.math.abs import kotlin.math.abs
class PlayerGestureController(activity: BaseActivity, private val listener: PlayerGestureOptions) : class PlayerGestureController(activity: BaseActivity, private val listener: PlayerGestureOptions) :

View File

@ -1,4 +1,4 @@
package com.github.libretube.util package com.github.libretube.ui.listeners
import android.graphics.Bitmap import android.graphics.Bitmap
import android.view.View import android.view.View
@ -10,6 +10,7 @@ import androidx.core.view.updateLayoutParams
import coil.request.ImageRequest import coil.request.ImageRequest
import com.github.libretube.api.obj.PreviewFrames import com.github.libretube.api.obj.PreviewFrames
import com.github.libretube.obj.PreviewFrame import com.github.libretube.obj.PreviewFrame
import com.github.libretube.helpers.ImageHelper
import com.google.android.exoplayer2.ui.TimeBar import com.google.android.exoplayer2.ui.TimeBar
class SeekbarPreviewListener( class SeekbarPreviewListener(

View File

@ -9,7 +9,7 @@ import com.github.libretube.api.obj.StreamItem
import com.github.libretube.api.obj.Subscription import com.github.libretube.api.obj.Subscription
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch

View File

@ -7,8 +7,8 @@ import androidx.preference.Preference
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.util.ImageHelper import com.github.libretube.helpers.ImageHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class AdvancedSettings : BasePreferenceFragment() { class AdvancedSettings : BasePreferenceFragment() {

View File

@ -12,7 +12,7 @@ import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.NavBarOptionsDialog import com.github.libretube.ui.dialogs.NavBarOptionsDialog
import com.github.libretube.ui.dialogs.RequireRestartDialog import com.github.libretube.ui.dialogs.RequireRestartDialog
import com.github.libretube.ui.sheets.IconsBottomSheet import com.github.libretube.ui.sheets.IconsBottomSheet
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class AppearanceSettings : BasePreferenceFragment() { class AppearanceSettings : BasePreferenceFragment() {
override val titleResourceId: Int = R.string.appearance override val titleResourceId: Int = R.string.appearance

View File

@ -10,8 +10,8 @@ import com.github.libretube.R
import com.github.libretube.obj.BackupFile import com.github.libretube.obj.BackupFile
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.BackupDialog import com.github.libretube.ui.dialogs.BackupDialog
import com.github.libretube.util.BackupHelper import com.github.libretube.helpers.BackupHelper
import com.github.libretube.util.ImportHelper import com.github.libretube.helpers.ImportHelper
import java.time.LocalDateTime import java.time.LocalDateTime
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter

View File

@ -9,8 +9,8 @@ import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.RequireRestartDialog import com.github.libretube.ui.dialogs.RequireRestartDialog
import com.github.libretube.util.LocaleHelper import com.github.libretube.helpers.LocaleHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class GeneralSettings : BasePreferenceFragment() { class GeneralSettings : BasePreferenceFragment() {
override val titleResourceId: Int = R.string.general override val titleResourceId: Int = R.string.general

View File

@ -20,7 +20,7 @@ import com.github.libretube.ui.dialogs.CustomInstanceDialog
import com.github.libretube.ui.dialogs.DeleteAccountDialog import com.github.libretube.ui.dialogs.DeleteAccountDialog
import com.github.libretube.ui.dialogs.LoginDialog import com.github.libretube.ui.dialogs.LoginDialog
import com.github.libretube.ui.dialogs.LogoutDialog import com.github.libretube.ui.dialogs.LogoutDialog
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class InstanceSettings : BasePreferenceFragment() { class InstanceSettings : BasePreferenceFragment() {
override val titleResourceId: Int = R.string.instance override val titleResourceId: Int = R.string.instance

View File

@ -8,7 +8,7 @@ import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.views.TimePickerPreference import com.github.libretube.ui.views.TimePickerPreference
import com.github.libretube.util.NotificationHelper import com.github.libretube.helpers.NotificationHelper
class NotificationSettings : BasePreferenceFragment() { class NotificationSettings : BasePreferenceFragment() {
override val titleResourceId: Int = R.string.notifications override val titleResourceId: Int = R.string.notifications

View File

@ -13,8 +13,8 @@ import androidx.preference.SwitchPreferenceCompat
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.util.LocaleHelper import com.github.libretube.helpers.LocaleHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
class PlayerSettings : BasePreferenceFragment() { class PlayerSettings : BasePreferenceFragment() {
override val titleResourceId: Int = R.string.player override val titleResourceId: Int = R.string.player

View File

@ -9,8 +9,8 @@ import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.obj.ShareData import com.github.libretube.obj.ShareData
import com.github.libretube.ui.dialogs.ShareDialog import com.github.libretube.ui.dialogs.ShareDialog
import com.github.libretube.util.BackgroundHelper import com.github.libretube.helpers.BackgroundHelper
import com.github.libretube.util.NavigationHelper import com.github.libretube.helpers.NavigationHelper
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
/** /**

View File

@ -7,7 +7,7 @@ import android.view.ViewGroup
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.databinding.PlaybackBottomSheetBinding import com.github.libretube.databinding.PlaybackBottomSheetBinding
import com.github.libretube.extensions.round import com.github.libretube.extensions.round
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.PlaybackParameters import com.google.android.exoplayer2.PlaybackParameters

View File

@ -16,7 +16,7 @@ import com.github.libretube.obj.ShareData
import com.github.libretube.ui.dialogs.DeletePlaylistDialog import com.github.libretube.ui.dialogs.DeletePlaylistDialog
import com.github.libretube.ui.dialogs.RenamePlaylistDialog import com.github.libretube.ui.dialogs.RenamePlaylistDialog
import com.github.libretube.ui.dialogs.ShareDialog import com.github.libretube.ui.dialogs.ShareDialog
import com.github.libretube.util.BackgroundHelper import com.github.libretube.helpers.BackgroundHelper
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch

View File

@ -9,7 +9,7 @@ import com.github.libretube.obj.ShareData
import com.github.libretube.ui.dialogs.AddToPlaylistDialog import com.github.libretube.ui.dialogs.AddToPlaylistDialog
import com.github.libretube.ui.dialogs.DownloadDialog import com.github.libretube.ui.dialogs.DownloadDialog
import com.github.libretube.ui.dialogs.ShareDialog import com.github.libretube.ui.dialogs.ShareDialog
import com.github.libretube.util.BackgroundHelper import com.github.libretube.helpers.BackgroundHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers

View File

@ -8,7 +8,7 @@ import androidx.core.os.postDelayed
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.activities.MainActivity import com.github.libretube.ui.activities.MainActivity
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
object SleepTimer { object SleepTimer {

View File

@ -4,7 +4,7 @@ import android.content.Context
import android.util.AttributeSet import android.util.AttributeSet
import android.util.TypedValue import android.util.TypedValue
import androidx.appcompat.widget.AppCompatTextView import androidx.appcompat.widget.AppCompatTextView
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
class AppNameTextView : AppCompatTextView { class AppNameTextView : AppCompatTextView {
constructor(context: Context, attributeSet: AttributeSet?) : super(context, attributeSet) constructor(context: Context, attributeSet: AttributeSet?) : super(context, attributeSet)

View File

@ -32,10 +32,10 @@ import com.github.libretube.ui.interfaces.PlayerOptions
import com.github.libretube.ui.models.PlayerViewModel import com.github.libretube.ui.models.PlayerViewModel
import com.github.libretube.ui.sheets.BaseBottomSheet import com.github.libretube.ui.sheets.BaseBottomSheet
import com.github.libretube.ui.sheets.PlaybackOptionsSheet import com.github.libretube.ui.sheets.PlaybackOptionsSheet
import com.github.libretube.util.AudioHelper import com.github.libretube.helpers.AudioHelper
import com.github.libretube.util.BrightnessHelper import com.github.libretube.helpers.BrightnessHelper
import com.github.libretube.util.PlayerGestureController import com.github.libretube.ui.listeners.PlayerGestureController
import com.github.libretube.util.PlayerHelper import com.github.libretube.helpers.PlayerHelper
import com.github.libretube.util.PlayingQueue import com.github.libretube.util.PlayingQueue
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.Player

View File

@ -8,7 +8,7 @@ import android.view.MotionEvent.ACTION_MOVE
import android.view.ViewConfiguration import android.view.ViewConfiguration
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
import kotlin.math.abs import kotlin.math.abs
class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) : class CustomSwipeToRefresh(context: Context?, attrs: AttributeSet?) :

View File

@ -11,8 +11,8 @@ import com.github.libretube.R
import com.github.libretube.api.obj.Segment import com.github.libretube.api.obj.Segment
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.extensions.dpToPx import com.github.libretube.extensions.dpToPx
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.helpers.ThemeHelper
import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.Player
import com.google.android.exoplayer2.ui.DefaultTimeBar import com.google.android.exoplayer2.ui.DefaultTimeBar

View File

@ -7,7 +7,7 @@ import androidx.preference.Preference
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.databinding.DialogSliderBinding import com.github.libretube.databinding.DialogSliderBinding
import com.github.libretube.extensions.round import com.github.libretube.extensions.round
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
/** /**

View File

@ -5,7 +5,7 @@ import android.text.format.DateFormat.is24HourFormat
import android.util.AttributeSet import android.util.AttributeSet
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.preference.Preference import androidx.preference.Preference
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.timepicker.MaterialTimePicker import com.google.android.material.timepicker.MaterialTimePicker
import com.google.android.material.timepicker.TimeFormat import com.google.android.material.timepicker.TimeFormat
import java.time.LocalTime import java.time.LocalTime

View File

@ -2,6 +2,8 @@ package com.github.libretube.util
import android.content.Context import android.content.Context
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.helpers.NetworkHelper
import com.github.libretube.helpers.PreferenceHelper
object DataSaverMode { object DataSaverMode {
fun isEnabled(context: Context): Boolean { fun isEnabled(context: Context): Boolean {

View File

@ -1,5 +1,7 @@
package com.github.libretube.util package com.github.libretube.util
import com.github.libretube.helpers.PreferenceHelper
class ExceptionHandler( class ExceptionHandler(
private val defaultExceptionHandler: Thread.UncaughtExceptionHandler? private val defaultExceptionHandler: Thread.UncaughtExceptionHandler?
) : Thread.UncaughtExceptionHandler { ) : Thread.UncaughtExceptionHandler {

View File

@ -24,6 +24,8 @@ import com.github.libretube.compat.PendingIntentCompat
import com.github.libretube.constants.BACKGROUND_CHANNEL_ID import com.github.libretube.constants.BACKGROUND_CHANNEL_ID
import com.github.libretube.constants.IntentData import com.github.libretube.constants.IntentData
import com.github.libretube.constants.PLAYER_NOTIFICATION_ID import com.github.libretube.constants.PLAYER_NOTIFICATION_ID
import com.github.libretube.helpers.ImageHelper
import com.github.libretube.helpers.PlayerHelper
import com.github.libretube.ui.activities.MainActivity import com.github.libretube.ui.activities.MainActivity
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.Player

View File

@ -21,7 +21,7 @@ import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.toID import com.github.libretube.extensions.toID
import com.github.libretube.ui.activities.MainActivity import com.github.libretube.ui.activities.MainActivity
import com.github.libretube.ui.views.TimePickerPreference import com.github.libretube.ui.views.TimePickerPreference
import com.github.libretube.util.PreferenceHelper import com.github.libretube.helpers.PreferenceHelper
import java.time.LocalTime import java.time.LocalTime
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking