mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Home page updates & UI tweaks
This commit is contained in:
parent
207f8656dd
commit
5fc3718e12
7 changed files with 59 additions and 40 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.github.damontecres.dolphin
|
||||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import timber.log.Timber
|
||||
|
||||
|
|
@ -10,8 +11,25 @@ class DolphinApplication : Application() {
|
|||
instance = this
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
// TODO minimal logging for release builds?
|
||||
Timber.plant(Timber.DebugTree())
|
||||
} else {
|
||||
Timber.plant(
|
||||
object : Timber.Tree() {
|
||||
override fun isLoggable(
|
||||
tag: String?,
|
||||
priority: Int,
|
||||
): Boolean = priority >= Log.INFO
|
||||
|
||||
override fun log(
|
||||
priority: Int,
|
||||
tag: String?,
|
||||
message: String,
|
||||
t: Throwable?,
|
||||
) {
|
||||
Log.println(priority, tag ?: "Dolphin", message)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,18 +102,21 @@ class CollectionFolderViewModel
|
|||
val request =
|
||||
GetItemsRequest(
|
||||
parentId = item.id,
|
||||
isSeries = true,
|
||||
mediaTypes = null,
|
||||
// recursive = true,
|
||||
enableImageTypes = listOf(ImageType.PRIMARY, ImageType.THUMB),
|
||||
includeItemTypes = includeItemTypes,
|
||||
recursive = true,
|
||||
sortBy =
|
||||
listOf(
|
||||
sortAndDirection.sort,
|
||||
ItemSortBy.SORT_NAME,
|
||||
ItemSortBy.PRODUCTION_YEAR,
|
||||
),
|
||||
sortOrder = listOf(sortAndDirection.direction),
|
||||
sortOrder =
|
||||
listOf(
|
||||
sortAndDirection.direction,
|
||||
SortOrder.ASCENDING,
|
||||
SortOrder.ASCENDING,
|
||||
),
|
||||
fields = DefaultItemFields,
|
||||
)
|
||||
val newPager =
|
||||
|
|
@ -145,6 +148,7 @@ class CollectionFolderViewModel
|
|||
nameLessThan = letter.toString(),
|
||||
limit = 0,
|
||||
enableTotalRecordCount = true,
|
||||
recursive = true,
|
||||
)
|
||||
val result by GetItemsRequestHandler.execute(api, request)
|
||||
result.totalRecordCount
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import androidx.compose.foundation.relocation.BringIntoViewRequester
|
|||
import androidx.compose.foundation.relocation.bringIntoViewRequester
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.PlayArrow
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
|
|
@ -177,20 +176,20 @@ fun MovieDetails(
|
|||
Destination.Playback(movie),
|
||||
)
|
||||
},
|
||||
DialogItem(
|
||||
"Playback Settings",
|
||||
Icons.Default.Settings,
|
||||
// DialogItem(
|
||||
// "Playback Settings",
|
||||
// Icons.Default.Settings,
|
||||
// // iconColor = Color.Green.copy(alpha = .8f),
|
||||
// ) {
|
||||
// // TODO choose audio or subtitle tracks?
|
||||
// },
|
||||
// DialogItem(
|
||||
// "Play Version",
|
||||
// Icons.Default.PlayArrow,
|
||||
// iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
// TODO choose audio or subtitle tracks?
|
||||
},
|
||||
DialogItem(
|
||||
"Play Version",
|
||||
Icons.Default.PlayArrow,
|
||||
iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
// TODO only show for multiple files
|
||||
},
|
||||
// ) {
|
||||
// // TODO only show for multiple files
|
||||
// },
|
||||
),
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ fun MovieDetailsHeader(
|
|||
overflow = TextOverflow.Ellipsis,
|
||||
modifier =
|
||||
Modifier
|
||||
.padding(8.dp)
|
||||
.height(60.dp),
|
||||
.padding(8.dp),
|
||||
// .height(60.dp),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +161,8 @@ fun MovieDetailsHeader(
|
|||
?.let {
|
||||
Text(
|
||||
text = "Directed by $it",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
)
|
||||
}
|
||||
// Key-Values
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.github.damontecres.dolphin.ui.detail.series
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowForward
|
||||
import androidx.compose.material.icons.filled.PlayArrow
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
|
|
@ -188,7 +187,6 @@ fun SeriesOverview(
|
|||
Icons.Default.PlayArrow,
|
||||
iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
viewModel.release()
|
||||
viewModel.navigateTo(
|
||||
Destination.Playback(
|
||||
ep.id,
|
||||
|
|
@ -202,7 +200,6 @@ fun SeriesOverview(
|
|||
Icons.AutoMirrored.Filled.ArrowForward,
|
||||
// iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
viewModel.release()
|
||||
viewModel.navigateTo(
|
||||
Destination.MediaItem(
|
||||
series.id,
|
||||
|
|
@ -211,20 +208,20 @@ fun SeriesOverview(
|
|||
),
|
||||
)
|
||||
},
|
||||
DialogItem(
|
||||
"Playback Settings",
|
||||
Icons.Default.Settings,
|
||||
// DialogItem(
|
||||
// "Playback Settings",
|
||||
// Icons.Default.Settings,
|
||||
// // iconColor = Color.Green.copy(alpha = .8f),
|
||||
// ) {
|
||||
// // TODO choose audio or subtitle tracks?
|
||||
// },
|
||||
// DialogItem(
|
||||
// "Play Version",
|
||||
// Icons.Default.PlayArrow,
|
||||
// iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
// TODO choose audio or subtitle tracks?
|
||||
},
|
||||
DialogItem(
|
||||
"Play Version",
|
||||
Icons.Default.PlayArrow,
|
||||
iconColor = Color.Green.copy(alpha = .8f),
|
||||
) {
|
||||
// TODO only show for multiple files
|
||||
},
|
||||
// ) {
|
||||
// // TODO only show for multiple files
|
||||
// },
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ fun HomePageContent(
|
|||
Modifier
|
||||
.fillMaxHeight(.7f)
|
||||
.fillMaxWidth(.7f)
|
||||
.alpha(.4f)
|
||||
.alpha(.75f)
|
||||
.align(Alignment.TopEnd)
|
||||
.drawWithContent {
|
||||
drawContent()
|
||||
|
|
|
|||
|
|
@ -311,7 +311,6 @@ fun NavigationDrawerScope.LibraryNavItem(
|
|||
modifier: Modifier = Modifier,
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
) {
|
||||
// TODO
|
||||
val icon =
|
||||
when (library.data.collectionType) {
|
||||
CollectionType.MOVIES -> R.string.fa_film
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue