mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
fix playlists not showing
This commit is contained in:
parent
ff77c69eb1
commit
ebaa7374cb
app/src/main
java/com/github/libretube
res/layout
@ -9,6 +9,7 @@ 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.DialogLoginBinding
|
||||
import com.github.libretube.obj.Login
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
@ -89,6 +90,7 @@ class LoginDialog : DialogFragment() {
|
||||
Toast.makeText(context, R.string.loggedIn, Toast.LENGTH_SHORT).show()
|
||||
PreferenceHelper.setToken(requireContext(), response.token!!)
|
||||
PreferenceHelper.setUsername(requireContext(), login.username!!)
|
||||
requireMainActivityRestart = true
|
||||
dialog?.dismiss()
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import android.widget.Toast
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.activities.requireMainActivityRestart
|
||||
import com.github.libretube.databinding.DialogLogoutBinding
|
||||
import com.github.libretube.util.PreferenceHelper
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
@ -25,6 +26,7 @@ class LogoutDialog : DialogFragment() {
|
||||
binding.user.text =
|
||||
binding.user.text.toString() + " (" + user + ")"
|
||||
binding.logout.setOnClickListener {
|
||||
requireMainActivityRestart = true
|
||||
Toast.makeText(context, R.string.loggedout, Toast.LENGTH_SHORT).show()
|
||||
PreferenceHelper.setToken(requireContext(), "")
|
||||
dialog?.dismiss()
|
||||
|
@ -2,7 +2,6 @@ package com.github.libretube.preferences
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import com.github.libretube.R
|
||||
|
@ -2,7 +2,6 @@ package com.github.libretube.preferences
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
|
@ -6,36 +6,6 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".fragments.LibraryFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/showWatchHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/ic_time_outlined" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:text="@string/watch_history"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/loginOrRegister2"
|
||||
android:layout_width="match_parent"
|
||||
@ -78,6 +48,33 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/showWatchHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/ic_time_outlined" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:text="@string/watch_history"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -94,8 +91,6 @@
|
||||
</ScrollView>
|
||||
</com.github.libretube.util.CustomSwipeToRefresh>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/create_playlist"
|
||||
android:layout_width="wrap_content"
|
||||
|
Loading…
Reference in New Issue
Block a user