From 1804640210ffd83aec23ac8399737a60f7f0ba48 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 1 Jul 2022 16:55:21 +0200 Subject: [PATCH] ktlint --- .../libretube/activities/NoInternetActivity.kt | 2 +- .../com/github/libretube/adapters/RepliesAdapter.kt | 2 +- .../com/github/libretube/adapters/SearchAdapter.kt | 2 +- .../libretube/adapters/SubscriptionAdapter.kt | 2 +- .../adapters/SubscriptionChannelAdapter.kt | 2 +- .../github/libretube/adapters/TrendingAdapter.kt | 2 +- .../github/libretube/dialogs/DeleteAccountDialog.kt | 2 +- .../com/github/libretube/dialogs/DownloadDialog.kt | 2 +- .../github/libretube/dialogs/VideoOptionsDialog.kt | 2 +- .../github/libretube/fragments/PlayerFragment.kt | 13 ++++--------- .../github/libretube/fragments/SearchFragment.kt | 2 +- .../github/libretube/preferences/AboutFragment.kt | 6 +++--- .../libretube/preferences/InstanceSettings.kt | 2 +- 13 files changed, 18 insertions(+), 23 deletions(-) diff --git a/app/src/main/java/com/github/libretube/activities/NoInternetActivity.kt b/app/src/main/java/com/github/libretube/activities/NoInternetActivity.kt index 7841790ad..cc2dcbe5a 100644 --- a/app/src/main/java/com/github/libretube/activities/NoInternetActivity.kt +++ b/app/src/main/java/com/github/libretube/activities/NoInternetActivity.kt @@ -28,4 +28,4 @@ class NoInternetActivity : AppCompatActivity() { finishAffinity() super.onBackPressed() } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt index d43f55c16..534ae0267 100644 --- a/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/RepliesAdapter.kt @@ -6,8 +6,8 @@ import android.view.ViewGroup import androidx.constraintlayout.motion.widget.MotionLayout import androidx.core.os.bundleOf import androidx.recyclerview.widget.RecyclerView -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.RepliesRowBinding import com.github.libretube.obj.Comment import com.github.libretube.util.formatShort diff --git a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt index a15dca33c..3706143eb 100644 --- a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt @@ -11,8 +11,8 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.os.bundleOf import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.RecyclerView -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.ChannelSearchRowBinding import com.github.libretube.databinding.PlaylistSearchRowBinding import com.github.libretube.databinding.VideoSearchRowBinding diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt index dd87d49da..a0813914c 100644 --- a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt @@ -10,8 +10,8 @@ import androidx.constraintlayout.motion.widget.MotionLayout import androidx.core.os.bundleOf import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.RecyclerView -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.TrendingRowBinding import com.github.libretube.dialogs.VideoOptionsDialog import com.github.libretube.fragments.PlayerFragment 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 32808082a..de1e78664 100644 --- a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt @@ -7,8 +7,8 @@ import android.view.View import android.view.ViewGroup import androidx.core.os.bundleOf import androidx.recyclerview.widget.RecyclerView -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.ChannelSubscriptionRowBinding import com.github.libretube.obj.Subscribe import com.github.libretube.obj.Subscription diff --git a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt index 85ab32a70..7baaf336e 100644 --- a/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt +++ b/app/src/main/java/com/github/libretube/adapters/TrendingAdapter.kt @@ -10,8 +10,8 @@ import androidx.constraintlayout.motion.widget.MotionLayout import androidx.core.os.bundleOf import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.RecyclerView -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.TrendingRowBinding import com.github.libretube.dialogs.VideoOptionsDialog import com.github.libretube.fragments.PlayerFragment diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt index 92a2f8631..f8f62cc86 100644 --- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt @@ -9,9 +9,9 @@ import androidx.core.text.HtmlCompat import androidx.fragment.app.DialogFragment import androidx.lifecycle.lifecycleScope import com.github.libretube.R +import com.github.libretube.activities.requireMainActivityRestart import com.github.libretube.databinding.DialogDeleteAccountBinding import com.github.libretube.obj.DeleteUserRequest -import com.github.libretube.activities.requireMainActivityRestart import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.RetrofitInstance import com.google.android.material.dialog.MaterialAlertDialogBuilder diff --git a/app/src/main/java/com/github/libretube/dialogs/DownloadDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DownloadDialog.kt index 7aa16def2..394ed4b6a 100644 --- a/app/src/main/java/com/github/libretube/dialogs/DownloadDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/DownloadDialog.kt @@ -13,8 +13,8 @@ import android.widget.ArrayAdapter import androidx.core.app.ActivityCompat import androidx.core.text.HtmlCompat import androidx.fragment.app.DialogFragment -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity import com.github.libretube.databinding.DialogDownloadBinding import com.github.libretube.obj.Streams import com.github.libretube.services.DownloadService diff --git a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt index 1cd3630a8..db6eb4948 100644 --- a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt +++ b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt @@ -6,8 +6,8 @@ import android.os.Bundle import android.widget.ArrayAdapter import android.widget.Toast import androidx.fragment.app.DialogFragment -import com.github.libretube.util.BackgroundMode import com.github.libretube.R +import com.github.libretube.util.BackgroundMode import com.github.libretube.util.PreferenceHelper import com.google.android.material.dialog.MaterialAlertDialogBuilder 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 2766e7b2f..e2575af2c 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -19,11 +19,6 @@ import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Button -import android.widget.FrameLayout -import android.widget.ImageButton -import android.widget.LinearLayout -import android.widget.TextView import android.widget.Toast import androidx.constraintlayout.motion.widget.MotionLayout import androidx.core.net.toUri @@ -33,8 +28,9 @@ import androidx.fragment.app.Fragment import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager -import com.github.libretube.activities.MainActivity import com.github.libretube.R +import com.github.libretube.activities.MainActivity +import com.github.libretube.activities.hideKeyboard import com.github.libretube.adapters.ChaptersAdapter import com.github.libretube.adapters.CommentsAdapter import com.github.libretube.adapters.TrendingAdapter @@ -42,7 +38,6 @@ import com.github.libretube.databinding.FragmentPlayerBinding import com.github.libretube.dialogs.AddtoPlaylistDialog import com.github.libretube.dialogs.DownloadDialog import com.github.libretube.dialogs.ShareDialog -import com.github.libretube.activities.hideKeyboard import com.github.libretube.obj.ChapterSegment import com.github.libretube.obj.PipedStream import com.github.libretube.obj.Playlist @@ -261,8 +256,8 @@ class PlayerFragment : Fragment() { } binding.commentsToggle.setOnClickListener { - toggleComments() - } + toggleComments() + } val fullScreenButton = binding.player.binding.fullscreen val exoTitle = binding.player.binding.exoTitle 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 8bc3ea09f..1671d1995 100644 --- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt @@ -20,11 +20,11 @@ import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager import com.github.libretube.R +import com.github.libretube.activities.hideKeyboard import com.github.libretube.adapters.SearchAdapter import com.github.libretube.adapters.SearchHistoryAdapter import com.github.libretube.adapters.SearchSuggestionsAdapter import com.github.libretube.databinding.FragmentSearchBinding -import com.github.libretube.activities.hideKeyboard import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.RetrofitInstance import com.google.android.material.dialog.MaterialAlertDialogBuilder diff --git a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt index 0e5a471fa..45682558d 100644 --- a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt +++ b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt @@ -9,14 +9,14 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment +import com.github.libretube.R +import com.github.libretube.activities.SettingsActivity +import com.github.libretube.databinding.FragmentAboutBinding import com.github.libretube.util.AUTHORS_URL import com.github.libretube.util.CONTRIBUTING_URL import com.github.libretube.util.DONATE_URL import com.github.libretube.util.PIPED_GITHUB_URL -import com.github.libretube.R -import com.github.libretube.activities.SettingsActivity import com.github.libretube.util.WEBSITE_URL -import com.github.libretube.databinding.FragmentAboutBinding import com.google.android.material.dialog.MaterialAlertDialogBuilder class AboutFragment : Fragment() { diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt index d7281ff92..5fa8b51a1 100644 --- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt @@ -19,11 +19,11 @@ import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import com.github.libretube.R import com.github.libretube.activities.SettingsActivity +import com.github.libretube.activities.requireMainActivityRestart import com.github.libretube.dialogs.CustomInstanceDialog import com.github.libretube.dialogs.DeleteAccountDialog import com.github.libretube.dialogs.LoginDialog import com.github.libretube.dialogs.LogoutDialog -import com.github.libretube.activities.requireMainActivityRestart import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.RetrofitInstance import org.json.JSONObject