Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
b3eef7f
ci: share the Gradle build cache between the Stack runners
Priveetee Nov 12, 2026
c0e8cde
feat: read images and voice replies attached to comments
Priveetee Nov 12, 2026
3891904
feat: play comment voice replies over the video
Priveetee Nov 12, 2026
a6d5f09
feat: show creator voice replies in the comments sheet
Priveetee Nov 12, 2026
26a9bc2
feat: show images and GIFs attached to comments
Priveetee Nov 12, 2026
d367a54
feat: search the comments of a video through the server
Priveetee Nov 12, 2026
945e5fc
refactor: move comment replies and the comment list out of the sheet
Priveetee Nov 12, 2026
bee4036
feat: keep comment search results and their cursor
Priveetee Nov 12, 2026
9293ef7
feat: search the comments from the comments sheet
Priveetee Nov 12, 2026
4a1530a
feat: read hold speed, autoplay on open and visibility settings
Priveetee Nov 12, 2026
cf5189f
feat: hide members-only videos when the viewer asks to
Priveetee Nov 12, 2026
aa4d9a3
feat: apply hold speed, autoplay on open and hidden upcoming videos
Priveetee Nov 12, 2026
40d11bb
refactor: share the rich text renderer through core ui
Priveetee Nov 12, 2026
7758e3f
refactor: share the external link dialog through core ui
Priveetee Nov 12, 2026
89ab3fa
feat: load community posts of a channel from the server
Priveetee Nov 12, 2026
d820175
feat: draw images, polls and videos of community posts
Priveetee Nov 12, 2026
df962ef
feat: draw community post cards
Priveetee Nov 12, 2026
b94fe23
feat: add a Posts tab to YouTube channels
Priveetee Nov 12, 2026
8c8d88e
feat: stream the live chat of YouTube lives from the server
Priveetee Nov 12, 2026
e601ff6
feat: follow a live chat and reconnect like the web client
Priveetee Nov 12, 2026
1b3225e
feat: open the live chat from the player of a live
Priveetee Nov 12, 2026
54752ba
feat: load subscription groups and filter the feed by group
Priveetee Nov 12, 2026
e7ad786
feat: let the subscriptions feed follow one group
Priveetee Nov 12, 2026
9f74389
feat: manage subscription groups and channel memberships
Priveetee Nov 12, 2026
50d02ca
feat: add sheets to manage subscription groups
Priveetee Nov 12, 2026
cee2a91
feat: show group filters and edit the groups of a channel
Priveetee Nov 12, 2026
e44718d
refactor: open sessions through a shared session establisher
Priveetee Nov 12, 2026
e518673
feat: switch profiles as separate accounts of the same instance
Priveetee Nov 12, 2026
fece5a6
feat: manage and switch profiles from the accounts settings
Priveetee Nov 12, 2026
b4f5bd3
feat: sign in to YouTube by code and BiliBili by QR through the server
Priveetee Nov 12, 2026
1fb9ced
feat: follow YouTube code and BiliBili QR sign-ins
Priveetee Nov 12, 2026
07d1969
feat: add a linked accounts screen to the settings
Priveetee Nov 12, 2026
2356298
feat: read and extend the family list of an instance
Priveetee Nov 12, 2026
ce95fe2
feat: let admins add a channel to the family list
Priveetee Nov 12, 2026
5ddcac6
feat: explain empty pages in family-list mode
Priveetee Nov 12, 2026
e20c5ab
feat: fetch watch positions of visible videos in one batch
Priveetee Nov 12, 2026
81abce0
feat: show how much of a video was watched on its card
Priveetee Nov 12, 2026
4faed0d
feat: load watch progress for home, search, channels and related videos
Priveetee Nov 12, 2026
c19e7a9
feat: look up, approve and refuse device sign-in codes
Priveetee Nov 12, 2026
9d9b050
feat: sign in a TV or another device from the accounts settings
Priveetee Nov 12, 2026
506101c
fix: keep the player settings screen testable without Hilt
Priveetee Nov 12, 2026
7273688
fix: tell offline, unreachable, slow and blocked failures apart
Priveetee Nov 13, 2026
3465d10
fix: name the real cause of a video that fails to load and retry pass…
Priveetee Nov 13, 2026
26e4678
perf: release the SABR session of a video as soon as playback leaves it
Priveetee Nov 13, 2026
699f231
fix: say when a sign-in code expired, was refused or is wrong
Priveetee Nov 13, 2026
be18fa2
fix: name rate limits and YouTube blocks that stop a playing video
Priveetee Nov 13, 2026
809423e
fix: save the last position of a video under that video when switching
Priveetee Nov 13, 2026
5192e89
refactor: split account and live content bindings out of the reposito…
Priveetee Nov 13, 2026
6b86882
perf: keep comment GIFs still unless the viewer turns them on
Priveetee Nov 13, 2026
c4d99f3
fix: show a provider block at once instead of retrying for minutes
Priveetee Nov 13, 2026
9f2aead
fix: stop retrying a dead connection after two tries when opening a v…
Priveetee Nov 13, 2026
fa62c0b
fix: say a profile or group no longer exists instead of missing content
Priveetee Nov 13, 2026
b74e4e3
fix: say a group no longer exists when the feed of a deleted group fails
Priveetee Nov 13, 2026
74d4437
fix: ask to allow HTTP instead of calling an http address unreachable
Priveetee Nov 13, 2026
d11da91
fix: stop the playing video as soon as another one is asked for
Priveetee Nov 13, 2026
bd194f4
fix: name the real cause when comments or their search fail
Priveetee Nov 13, 2026
0cdda84
fix: name the real cause when replies, voice replies or posts fail
Priveetee Nov 13, 2026
69a2521
test: match the SABR segment retry test to the eight retry budget
Priveetee Nov 13, 2026
f871fca
test: pin the network state when checking offline and unreachable errors
Priveetee Nov 13, 2026
43bc273
Merge remote-tracking branch 'origin/beta' into release/1.13.0-beta.4
Priveetee Nov 13, 2026
56ba323
chore: release 1.13.0-beta.4
Priveetee Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ android {

defaultConfig {
applicationId = "dev.typetype.android"
versionCode = 11118
versionName = "1.13.0-beta.3"
versionCode = 11119
versionName = "1.13.0-beta.4"
}

signingConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import dev.typetype.android.core.ui.navigation.PlayerSettingsRoute
import dev.typetype.android.core.ui.navigation.PrivacySettingsRoute
import dev.typetype.android.core.ui.navigation.ProfileSettingsRoute
import dev.typetype.android.core.ui.navigation.RssFeedsRoute
import dev.typetype.android.core.ui.navigation.LinkedAccountsRoute
import dev.typetype.android.core.ui.navigation.PushNotificationsRoute
import dev.typetype.android.core.ui.navigation.RecommenderSettingsRoute
import dev.typetype.android.core.ui.navigation.SettingsRoute
Expand Down Expand Up @@ -64,6 +65,7 @@ internal fun AdaptiveSettingsHost(
}
},
onOpenAccounts = { navController.selectSettings(AccountsRoute) },
onOpenLinkedAccounts = { navController.selectSettings(LinkedAccountsRoute) },
onOpenProfile = { navController.selectSettings(ProfileSettingsRoute) },
onOpenImport = { navController.selectSettings(ImportDataRoute) },
onOpenRssFeeds = { navController.selectSettings(RssFeedsRoute) },
Expand Down Expand Up @@ -105,6 +107,7 @@ internal fun NavHostController.selectSettings(route: Any) {
private fun NavDestination.settingsTitle(): Int? = when {
hasRoute<SettingsRoute>() || hasRoute<AppearanceRoute>() -> R.string.settings_appearance_title
hasRoute<AccountsRoute>() -> R.string.accounts_title
hasRoute<LinkedAccountsRoute>() -> R.string.linked_accounts_title
hasRoute<ProfileSettingsRoute>() -> R.string.settings_profile_title
hasRoute<ImportDataRoute>() -> R.string.settings_import_title
hasRoute<RssFeedsRoute>() -> R.string.rss_settings_title
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/dev/typetype/android/AppNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import dev.typetype.android.feature.settings.accounts.AccountSettingsRoute as Ac
import dev.typetype.android.feature.settings.appearance.AppearanceRoute as AppearanceRouteScreen
import dev.typetype.android.feature.settings.blocked.BlockedSettingsRoute as BlockedSettingsRouteScreen
import dev.typetype.android.feature.settings.content.ContentSettingsRoute as ContentSettingsRouteScreen
import dev.typetype.android.feature.settings.linkedaccounts.LinkedAccountsRoute as LinkedAccountsRouteScreen
import dev.typetype.android.feature.settings.recommender.RecommenderSettingsRoute as RecommenderSettingsRouteScreen
import dev.typetype.android.feature.settings.diagnostics.DiagnosticsRoute as DiagnosticsRouteScreen
import dev.typetype.android.feature.settings.player.PlayerSettingsRoute as PlayerSettingsRouteScreen
Expand Down Expand Up @@ -254,6 +255,9 @@ fun AppNavHost(
onNavigateBack = { navController.popBackStack() },
)
}
composable<dev.typetype.android.core.ui.navigation.LinkedAccountsRoute> {
LinkedAccountsRouteScreen(onNavigateBack = { navController.popBackStack() })
}
composable<dev.typetype.android.core.ui.navigation.RecommenderSettingsRoute> {
RecommenderSettingsRouteScreen(onNavigateBack = { navController.popBackStack() })
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/dev/typetype/android/SettingsNavigation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import dev.typetype.android.core.ui.navigation.DiagnosticsRoute
import dev.typetype.android.core.ui.navigation.ImportDataRoute
import dev.typetype.android.core.ui.navigation.LicensesRoute
import dev.typetype.android.core.ui.navigation.PlayerSettingsRoute
import dev.typetype.android.core.ui.navigation.LinkedAccountsRoute
import dev.typetype.android.core.ui.navigation.PrivacySettingsRoute
import dev.typetype.android.core.ui.navigation.ProfileSettingsRoute
import dev.typetype.android.core.ui.navigation.RecommenderSettingsRoute
Expand Down Expand Up @@ -44,6 +45,7 @@ internal fun NavGraphBuilder.settingsDestinations(
onOpenAppearance = { navController.navigate(AppearanceRoute) },
onOpenContent = { navController.navigate(ContentSettingsRoute) },
onOpenRecommendations = { navController.navigate(RecommenderSettingsRoute) },
onOpenLinkedAccounts = { navController.navigate(LinkedAccountsRoute) },
onOpenPlayer = { navController.navigate(PlayerSettingsRoute) },
onOpenPushNotifications = { navController.navigate(dev.typetype.android.core.ui.navigation.PushNotificationsRoute) },
onOpenStorage = { navController.navigate(StorageSettingsRoute) },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package dev.typetype.android.core.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.typetype.android.data.allowlist.RemoteAllowedChannelsRepository
import dev.typetype.android.data.auth.RemoteAccountProfilesRepository
import dev.typetype.android.data.devicelink.RemoteDeviceLinkRepository
import dev.typetype.android.data.linkedsessions.RemoteLinkedSessionsRepository
import dev.typetype.android.data.subscriptions.RemoteSubscriptionGroupsRepository
import dev.typetype.android.domain.allowlist.AllowedChannelsRepository
import dev.typetype.android.domain.devicelink.DeviceLinkRepository
import dev.typetype.android.domain.linkedsessions.BiliBiliSessionRepository
import dev.typetype.android.domain.linkedsessions.YoutubeDeviceLoginRepository
import dev.typetype.android.domain.profiles.AccountProfilesRepository
import dev.typetype.android.domain.subscriptions.SubscriptionGroupsRepository
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class AccountServicesRepositoryModule {

@Binds
@Singleton
abstract fun bindSubscriptionGroupsRepository(
impl: RemoteSubscriptionGroupsRepository,
): SubscriptionGroupsRepository

@Binds
@Singleton
abstract fun bindAccountProfilesRepository(impl: RemoteAccountProfilesRepository): AccountProfilesRepository

@Binds
@Singleton
abstract fun bindYoutubeDeviceLoginRepository(impl: RemoteLinkedSessionsRepository): YoutubeDeviceLoginRepository

@Binds
@Singleton
abstract fun bindBiliBiliSessionRepository(impl: RemoteLinkedSessionsRepository): BiliBiliSessionRepository

@Binds
@Singleton
abstract fun bindAllowedChannelsRepository(impl: RemoteAllowedChannelsRepository): AllowedChannelsRepository

@Binds
@Singleton
abstract fun bindDeviceLinkRepository(impl: RemoteDeviceLinkRepository): DeviceLinkRepository
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package dev.typetype.android.core.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.typetype.android.data.channel.ChannelPostsRepositoryImpl
import dev.typetype.android.data.livechat.RemoteLiveChatRepository
import dev.typetype.android.data.progress.WatchProgressCache
import dev.typetype.android.domain.channel.ChannelPostsRepository
import dev.typetype.android.domain.livechat.LiveChatRepository
import dev.typetype.android.domain.progress.WatchProgressSource
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class LiveContentRepositoryModule {

@Binds
@Singleton
abstract fun bindWatchProgressSource(impl: WatchProgressCache): WatchProgressSource

@Binds
@Singleton
abstract fun bindLiveChatRepository(impl: RemoteLiveChatRepository): LiveChatRepository

@Binds
@Singleton
abstract fun bindChannelPostsRepository(impl: ChannelPostsRepositoryImpl): ChannelPostsRepository
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import dev.typetype.android.data.usersettings.RemoteSeekbarIconRepository
import dev.typetype.android.data.usersettings.RemoteUserSettingsRepository
import dev.typetype.android.domain.usersettings.PlaybackStartPolicy
import dev.typetype.android.domain.usersettings.SeekbarIconRepository
import dev.typetype.android.domain.usersettings.UserSettingsRepository
import javax.inject.Singleton
Expand All @@ -17,6 +18,10 @@ abstract class UserSettingsModule {
@Singleton
abstract fun bindUserSettingsRepository(impl: RemoteUserSettingsRepository): UserSettingsRepository

@Binds
@Singleton
abstract fun bindPlaybackStartPolicy(impl: RemoteUserSettingsRepository): PlaybackStartPolicy

@Binds
@Singleton
abstract fun bindSeekbarIconRepository(impl: RemoteSeekbarIconRepository): SeekbarIconRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package dev.typetype.android.data.allowlist

import dev.typetype.android.core.error.suspendRunCatching
import dev.typetype.android.data.account.ActiveAccountScope
import dev.typetype.android.data.network.TypeTypeApiHolder
import dev.typetype.android.data.network.dto.AllowedChannelDto
import dev.typetype.android.data.network.requireSuccessfulResponse
import dev.typetype.android.domain.allowlist.AllowedChannelsRepository
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

@Singleton
class RemoteAllowedChannelsRepository @Inject constructor(
private val apiHolder: TypeTypeApiHolder,
private val activeAccountScope: ActiveAccountScope,
) : AllowedChannelsRepository {
override suspend fun allowedChannelUrls(): Result<Set<String>> = suspendRunCatching {
val scope = activeAccountScope.require()
val response = withContext(Dispatchers.IO) { apiHolder.require(scope).allowedChannels() }
response.requireSuccessfulResponse()
activeAccountScope.verify(scope)
response.body().orEmpty().mapTo(HashSet()) { it.url }
}

// The server only honours "global" for admins and moderators, who manage the instance family list.
override suspend fun allowForEveryone(channelUrl: String, name: String, avatarUrl: String?): Result<Unit> =
suspendRunCatching {
val scope = activeAccountScope.require()
val body = AllowedChannelDto(url = channelUrl, name = name, thumbnailUrl = avatarUrl, global = true)
val response = withContext(Dispatchers.IO) { apiHolder.require(scope).allowChannel(body) }
response.requireSuccessfulResponse()
activeAccountScope.verify(scope)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class AuthRepositoryImpl @Inject constructor(
private val oidcTransactionStore: OidcTransactionStore,
private val scopedApiFactory: ScopedApiFactory,
private val oidcRedirect: OidcRedirect,
private val sessionEstablisher: AuthSessionEstablisher,
) : AuthRepository {

override suspend fun loginWithCredentials(
Expand All @@ -58,7 +59,7 @@ class AuthRepositoryImpl @Inject constructor(
}
response.requireSuccessfulResponse()
val token = response.body()?.accessToken ?: error("Empty token in response")
establishSession(serverId, api, token, expectedAccountId)
sessionEstablisher.establish(serverId, api, token, expectedAccountId)
}.onFailure { cookieJar.cancelAuthentication(serverId) }

override suspend fun loginAsGuest(serverId: String): Result<Unit> = suspendRunCatching {
Expand All @@ -68,7 +69,7 @@ class AuthRepositoryImpl @Inject constructor(
val response = withContext(Dispatchers.IO) { api.guest() }
response.requireSuccessfulResponse()
val token = response.body()?.token ?: error("Empty token in response")
establishSession(serverId, api, token)
sessionEstablisher.establish(serverId, api, token)
}.onFailure { cookieJar.cancelAuthentication(serverId) }

override suspend fun registerWithCredentials(
Expand All @@ -85,7 +86,7 @@ class AuthRepositoryImpl @Inject constructor(
}
response.requireSuccessfulResponse()
val token = response.body()?.accessToken ?: error("Empty token in response")
establishSession(serverId, api, token)
sessionEstablisher.establish(serverId, api, token)
}.onFailure { cookieJar.cancelAuthentication(serverId) }

override suspend fun getRegistrationStatus(serverId: String): Result<RegistrationStatus> =
Expand Down Expand Up @@ -233,7 +234,7 @@ class AuthRepositoryImpl @Inject constructor(
}
response.requireSuccessfulResponse()
val token = response.body()?.accessToken ?: error("Empty token in OIDC response")
establishSession(
sessionEstablisher.establish(
serverId,
retrofitFactory.createWithoutAutomaticAuthentication(server.baseUrl),
token,
Expand All @@ -249,23 +250,4 @@ class AuthRepositoryImpl @Inject constructor(

override fun hasPendingOidc(serverId: String): Boolean = oidcTransactionStore.hasPending(serverId)

private suspend fun establishSession(
serverId: String,
api: TypeTypeApi,
token: String,
expectedAccountId: String? = null,
) {
val profileResponse = withContext(Dispatchers.IO) { api.me("Bearer $token") }
profileResponse.requireSuccessfulResponse()
val profile = profileResponse.body() ?: error("The instance returned an empty account")
requireExpectedAccount(expectedAccountId, profile.id)
val previousGeneration = accountDao.get(serverId, profile.id)?.sessionGeneration ?: 0L
val generation = maxOf(System.currentTimeMillis(), previousGeneration + 1L)
accountDao.upsert(AccountEntity.fromProfile(serverId, profile, generation))
tokenStore.setAuthenticatedAccessToken(serverId, profile.id, token)
cookieJar.completeAuthentication(serverId, profile.id)
accountScopeStore.setCurrentAccountId(serverId, profile.id)
serverRepository.setCurrentServer(serverId)
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package dev.typetype.android.data.auth

import dev.typetype.android.data.account.AccountDao
import dev.typetype.android.data.account.AccountEntity
import dev.typetype.android.data.account.AccountScopeStore
import dev.typetype.android.data.network.AccessTokenStore
import dev.typetype.android.data.network.PersistentCookieJar
import dev.typetype.android.data.network.TypeTypeApi
import dev.typetype.android.data.network.requireSuccessfulResponse
import dev.typetype.android.domain.server.ServerRepository
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

@Singleton
class AuthSessionEstablisher @Inject constructor(
private val serverRepository: ServerRepository,
private val tokenStore: AccessTokenStore,
private val cookieJar: PersistentCookieJar,
private val accountDao: AccountDao,
private val accountScopeStore: AccountScopeStore,
) {
suspend fun establish(
serverId: String,
api: TypeTypeApi,
token: String,
expectedAccountId: String? = null,
) {
val profileResponse = withContext(Dispatchers.IO) { api.me("Bearer $token") }
profileResponse.requireSuccessfulResponse()
val profile = profileResponse.body() ?: error("The instance returned an empty account")
requireExpectedAccount(expectedAccountId, profile.id)
val previousGeneration = accountDao.get(serverId, profile.id)?.sessionGeneration ?: 0L
val generation = maxOf(System.currentTimeMillis(), previousGeneration + 1L)
accountDao.upsert(AccountEntity.fromProfile(serverId, profile, generation))
tokenStore.setAuthenticatedAccessToken(serverId, profile.id, token)
cookieJar.completeAuthentication(serverId, profile.id)
accountScopeStore.setCurrentAccountId(serverId, profile.id)
serverRepository.setCurrentServer(serverId)
}
}
Loading