mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
allow unlimited sized widget
but limit the max items to 50, just incase someone on a tablet makes it fullscreen
This commit is contained in:
parent
de0f57e86f
commit
95e58a7d89
2 changed files with 2 additions and 3 deletions
|
@ -39,6 +39,7 @@ import kotlinx.coroutines.MainScope
|
|||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
import kotlin.math.min
|
||||
|
||||
class UpdatesGridGlanceWidget : GlanceAppWidget() {
|
||||
private val app: Application by injectLazy()
|
||||
|
@ -76,7 +77,7 @@ class UpdatesGridGlanceWidget : GlanceAppWidget() {
|
|||
.flatMap { manager.getAppWidgetSizes(it) }
|
||||
.maxBy { it.height.value * it.width.value }
|
||||
.calculateRowAndColumnCount()
|
||||
val processList = list ?: RecentsPresenter.getRecentManga(customAmount = rowCount * columnCount)
|
||||
val processList = list ?: RecentsPresenter.getRecentManga(customAmount = min(50, rowCount * columnCount))
|
||||
|
||||
data = prepareList(processList, rowCount * columnCount)
|
||||
ids.forEach { update(app, it) }
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
android:minHeight="60dp"
|
||||
android:minResizeWidth="80dp"
|
||||
android:minResizeHeight="40dp"
|
||||
android:maxResizeWidth="600dp"
|
||||
android:maxResizeHeight="600dp"
|
||||
android:targetCellWidth="4"
|
||||
android:targetCellHeight="2"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue