Cleaning
This commit is contained in:
parent
c80177377c
commit
ec0fd2faee
@ -84,7 +84,7 @@ class ReaderActivity : AppCompatActivity(), DIAware {
|
||||
}
|
||||
|
||||
private fun readItem(item: SelfossModel.Item) {
|
||||
if (appSettingsService.isMarkOnScrollEnabled() and !appSettingsService.getPublicAccess()) {
|
||||
if (appSettingsService.isMarkOnScrollEnabled() && !appSettingsService.getPublicAccess()) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
repository.markAsRead(item)
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class SelfossModel {
|
||||
fun getApiConfiguration() = configuration ?: ApiConfiguration(null, null)
|
||||
}
|
||||
|
||||
@kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class ApiConfiguration(
|
||||
@Serializable(with = BooleanSerializer::class)
|
||||
val publicMode: Boolean?,
|
||||
|
@ -448,6 +448,9 @@ class Repository(
|
||||
if (fetchedInformation.data.getApiMajorVersion() != apiMajorVersion) {
|
||||
appSettingsService.updateApiVersion(fetchedInformation.data.getApiMajorVersion())
|
||||
}
|
||||
// Check if we're accessing the instance in public mode
|
||||
// This happens when auth and public mode are enabled but
|
||||
// no credentials are provided to login
|
||||
if (appSettingsService.getUserName().isEmpty()
|
||||
&& fetchedInformation.data.getApiConfiguration().isAuthEnabled()
|
||||
&& fetchedInformation.data.getApiConfiguration().isPublicModeEnabled()) {
|
||||
|
Loading…
Reference in New Issue
Block a user