minor tweaks (#115)

* Added telegram link

* Removed UPI (rebel not indian)

* minor changes

* Shows number of manga/Ln downloaded

* fixed list name overlapping with notch

* wrong index selection in language fixed

* novel icon

* Emerald theme name changed to Ocean

* forgot to remove

* why was these still there
This commit is contained in:
aayush262 2024-01-09 09:41:00 +05:30 committed by GitHub
parent af992bd19c
commit 01f9e86475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 149 additions and 190 deletions

View file

@ -1,6 +1,7 @@
package ani.dantotsu.download.manga
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.net.Uri
@ -20,6 +21,7 @@ import android.widget.AbsListView
import android.widget.AutoCompleteTextView
import android.widget.GridView
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.cardview.widget.CardView
import androidx.fragment.app.Fragment
@ -57,6 +59,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
private lateinit var gridView: GridView
private lateinit var adapter: OfflineMangaAdapter
@SuppressLint("SetTextI18n")
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@ -177,7 +180,8 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
snackString("no media found")
}
}
val total = view.findViewById<TextView>(R.id.total)
total.text = if (gridView.count > 0) "Manga and Novels (${gridView.count})" else "Empty List"
gridView.setOnItemLongClickListener { parent, view, position, id ->
// Get the OfflineMangaModel that was clicked
val item = adapter.getItem(position) as OfflineMangaModel
@ -194,6 +198,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
downloadManager.removeMedia(item.title, type)
getDownloads()
adapter.setItems(downloads)
}
builder.setNegativeButton("No") { _, _ ->
// Do nothing
@ -202,7 +207,6 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
dialog.window?.setDimAmount(0.8f)
true
}
return view
}