diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt index 4397101cb..3938ae50d 100644 --- a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt @@ -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, diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt index 049e6565b..9aa860f27 100644 --- a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt @@ -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, diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt index fb06eda1b..ca8c24bef 100644 --- a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt @@ -15,11 +15,11 @@ import com.github.libretube.obj.Subscribe import com.github.libretube.obj.Subscription import com.github.libretube.util.RetrofitInstance import com.squareup.picasso.Picasso +import java.io.IOException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import retrofit2.HttpException -import java.io.IOException class SubscriptionChannelAdapter(private val subscriptions: MutableList) : RecyclerView.Adapter() { diff --git a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt index 126bdd7e0..80453c14b 100644 --- a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt @@ -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 retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class AddtoPlaylistDialog : DialogFragment() { private val TAG = "AddToPlaylistDialog" diff --git a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt index 000bf1897..d33cf90ee 100644 --- a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt @@ -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 retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class CreatePlaylistDialog : DialogFragment() { val TAG = "CreatePlaylistDialog" diff --git a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt index 8d1cc33f8..ae27c5ca2 100644 --- a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt @@ -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 retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class LoginDialog : DialogFragment() { private val TAG = "LoginDialog" diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt index 61ea05aa1..bf33cecf6 100644 --- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt @@ -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 retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class ChannelFragment : Fragment() { diff --git a/app/src/main/java/com/github/libretube/fragments/Home.kt b/app/src/main/java/com/github/libretube/fragments/Home.kt index c6972c0be..dd4c675c4 100644 --- a/app/src/main/java/com/github/libretube/fragments/Home.kt +++ b/app/src/main/java/com/github/libretube/fragments/Home.kt @@ -17,8 +17,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.github.libretube.R import com.github.libretube.adapters.TrendingAdapter import com.github.libretube.util.RetrofitInstance -import retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class Home : Fragment() { diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt index 23bf12b9d..e8c2699d1 100644 --- a/app/src/main/java/com/github/libretube/fragments/Library.kt +++ b/app/src/main/java/com/github/libretube/fragments/Library.kt @@ -18,8 +18,8 @@ import com.github.libretube.R import com.github.libretube.adapters.PlaylistsAdapter import com.github.libretube.dialogs.CreatePlaylistDialog import com.github.libretube.util.RetrofitInstance -import retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class Library : Fragment() { diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index ccef5b6ad..16495a5c3 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -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 diff --git a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt index efdebacaf..d40038aaa 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt @@ -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 retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class PlaylistFragment : Fragment() { private var playlist_id: String? = null diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt index 3c23723ac..fd7a36619 100644 --- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt @@ -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" diff --git a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt index 1804774ad..8e18b9715 100644 --- a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt +++ b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt @@ -27,8 +27,8 @@ import com.github.libretube.R import com.github.libretube.adapters.SubscriptionAdapter import com.github.libretube.adapters.SubscriptionChannelAdapter import com.github.libretube.util.RetrofitInstance -import retrofit2.HttpException import java.io.IOException +import retrofit2.HttpException class Subscriptions : Fragment() { val TAG = "SubFragment" diff --git a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt index 11c88e774..04bb1d33d 100644 --- a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt @@ -25,13 +25,13 @@ import com.github.libretube.isCurrentViewMainSettings import com.github.libretube.requireMainActivityRestart import com.github.libretube.util.RetrofitInstance import com.github.libretube.util.ThemeHelper -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 class MainSettings : PreferenceFragmentCompat() { val TAG = "SettingsFragment" diff --git a/app/src/main/java/com/github/libretube/util/UpdateChecker.kt b/app/src/main/java/com/github/libretube/util/UpdateChecker.kt index 127e65e3b..7f4db01f3 100644 --- a/app/src/main/java/com/github/libretube/util/UpdateChecker.kt +++ b/app/src/main/java/com/github/libretube/util/UpdateChecker.kt @@ -4,12 +4,12 @@ import android.util.Log import androidx.fragment.app.FragmentManager import com.github.libretube.BuildConfig import com.github.libretube.dialogs.UpdateAvailableDialog -import org.json.JSONArray -import org.json.JSONObject import java.io.BufferedReader import java.io.InputStreamReader import java.net.URL import javax.net.ssl.HttpsURLConnection +import org.json.JSONArray +import org.json.JSONObject fun checkUpdate(childFragmentManager: FragmentManager) { var updateInfo: UpdateInfo? = UpdateInfo("", "")