kotlin format

This commit is contained in:
Bnyro 2022-06-03 18:51:27 +02:00
parent 18dbc4cf28
commit 55dc775bb5
15 changed files with 20 additions and 20 deletions

View File

@ -15,8 +15,8 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.adapters.TrendingAdapter
import com.github.libretube.util.RetrofitInstance
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class Home : Fragment() {

View File

@ -18,8 +18,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.adapters.PlaylistsAdapter
import com.github.libretube.dialogs.CreatePlaylistDialog
import com.github.libretube.util.RetrofitInstance
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class Library : Fragment() {

View File

@ -31,13 +31,13 @@ import com.github.libretube.dialogs.LoginDialog
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.color.DynamicColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.json.JSONObject
import org.json.JSONTokener
import retrofit2.HttpException
import java.io.IOException
import java.io.InputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import org.json.JSONObject
import org.json.JSONTokener
import retrofit2.HttpException
private var isCurrentViewMainSettings = true
private var requireMainActivityRestart = false

View File

@ -25,8 +25,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.adapters.SubscriptionAdapter
import com.github.libretube.adapters.SubscriptionChannelAdapter
import com.github.libretube.util.RetrofitInstance
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class Subscriptions : Fragment() {
val TAG = "SubFragment"

View File

@ -20,10 +20,10 @@ import com.github.libretube.obj.PlaylistId
import com.github.libretube.obj.StreamItem
import com.github.libretube.util.RetrofitInstance
import com.squareup.picasso.Picasso
import java.io.IOException
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import retrofit2.HttpException
import java.io.IOException
class PlaylistAdapter(
private val videoFeed: MutableList<StreamItem>,

View File

@ -17,10 +17,10 @@ import com.github.libretube.obj.Playlists
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.squareup.picasso.Picasso
import java.io.IOException
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import retrofit2.HttpException
import java.io.IOException
class PlaylistsAdapter(
private val playlists: MutableList<Playlists>,

View File

@ -19,8 +19,8 @@ import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class AddtoPlaylistDialog : DialogFragment() {
private val TAG = "AddToPlaylistDialog"

View File

@ -19,8 +19,8 @@ import com.github.libretube.obj.Playlists
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class CreatePlaylistDialog : DialogFragment() {
val TAG = "CreatePlaylistDialog"
@ -66,6 +66,7 @@ class CreatePlaylistDialog : DialogFragment() {
builder.create()
} ?: throw IllegalStateException("Activity cannot be null")
}
private fun createPlaylist(name: String) {
fun run() {
lifecycleScope.launchWhenCreated {

View File

@ -81,7 +81,7 @@ class DownloadDialog : DialogFragment() {
vidName.add("No video")
var vidUrl = arrayListOf<String>()
vidUrl.add("")
for (vid in streams?.videoStreams!!) {
for (vid in streams.videoStreams!!) {
val name = vid.quality + " " + vid.format
vidName.add(name)
vidUrl.add(vid.url!!)
@ -90,7 +90,7 @@ class DownloadDialog : DialogFragment() {
audioName.add("No audio")
var audioUrl = arrayListOf<String>()
audioUrl.add("")
for (audio in streams?.audioStreams!!) {
for (audio in streams.audioStreams!!) {
val name = audio.quality + " " + audio.format
audioName.add(name)
audioUrl.add(audio.url!!)

View File

@ -17,8 +17,8 @@ import com.github.libretube.R
import com.github.libretube.obj.Login
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class LoginDialog : DialogFragment() {
private val TAG = "LoginDialog"

View File

@ -22,8 +22,8 @@ import com.github.libretube.obj.Subscribe
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.button.MaterialButton
import com.squareup.picasso.Picasso
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class ChannelFragment : Fragment() {

View File

@ -82,11 +82,11 @@ import com.google.android.exoplayer2.util.RepeatModeUtil
import com.google.android.material.button.MaterialButton
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.squareup.picasso.Picasso
import org.chromium.net.CronetEngine
import retrofit2.HttpException
import java.io.IOException
import java.util.concurrent.Executors
import kotlin.math.abs
import org.chromium.net.CronetEngine
import retrofit2.HttpException
var isFullScreen = false

View File

@ -15,8 +15,8 @@ import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.R
import com.github.libretube.adapters.PlaylistAdapter
import com.github.libretube.util.RetrofitInstance
import java.io.IOException
import retrofit2.HttpException
import java.io.IOException
class PlaylistFragment : Fragment() {
private var playlist_id: String? = null

View File

@ -30,11 +30,11 @@ import com.github.libretube.adapters.SearchHistoryAdapter
import com.github.libretube.hideKeyboard
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.IOException
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import retrofit2.HttpException
import java.io.IOException
class SearchFragment : Fragment() {
private val TAG = "SearchFragment"

View File

@ -52,8 +52,7 @@ data class Streams(
parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
parcel.readString(),
TODO("chapters")
) {
}
)
constructor() : this(
"", "", "", "", "", "", "", "", "", "", null, -1, -1, -1, -1, emptyList(), emptyList(),