Compare commits
4 Commits
v123051301
...
v123051331
Author | SHA1 | Date | |
---|---|---|---|
ecd23213f9 | |||
e6baed8cb4 | |||
c87abec0b9 | |||
0aba41d8bf |
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,3 +1,18 @@
|
||||
**v123051321**
|
||||
|
||||
- debug: Debug null context.
|
||||
- Changelog for v123051301 [CI SKIP]
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
**v123051301**
|
||||
|
||||
- feat: Basic auth from url. Fixes #142 (#143)
|
||||
- debug: Debug index out of bound exception.
|
||||
- Changelog for v123051211 [CI SKIP]
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
**v123051211**
|
||||
|
||||
- fix: Sometimes url isn't even defined.
|
||||
|
@ -530,7 +530,12 @@ class ArticleFragment : Fragment(), DIAware {
|
||||
|
||||
private fun openInBrowserAfterFailing() {
|
||||
binding.progressBar.visibility = View.GONE
|
||||
requireActivity().openInBrowserAsNewTask(this@ArticleFragment.item)
|
||||
if (context != null) {
|
||||
requireContext().openInBrowserAsNewTask(this@ArticleFragment.item)
|
||||
} else {
|
||||
Exception("openInBrowserAfterFailing context is null").sendSilentlyWithAcraWithName("openInBrowserAfterFailing > $context")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
@ -6,12 +6,12 @@ class MercuryModel {
|
||||
|
||||
@Serializable
|
||||
class ParsedContent(
|
||||
val title: String?,
|
||||
val content: String?,
|
||||
val lead_image_url: String?, // NOSONAR
|
||||
val url: String?,
|
||||
val error: Boolean?,
|
||||
val message: String?,
|
||||
val failed: Boolean?
|
||||
val title: String? = null,
|
||||
val content: String? = null,
|
||||
val lead_image_url: String? = null, // NOSONAR
|
||||
val url: String? = null,
|
||||
val error: Boolean? = null,
|
||||
val message: String? = null,
|
||||
val failed: Boolean? = null
|
||||
)
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ class SelfossModel {
|
||||
@Serializable
|
||||
class Stats(
|
||||
val total: Int,
|
||||
val unread: Int?,
|
||||
val starred: Int?
|
||||
val unread: Int? = null,
|
||||
val starred: Int? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@ -36,9 +36,9 @@ class SelfossModel {
|
||||
|
||||
@Serializable
|
||||
data class ApiInformation(
|
||||
val version: String?,
|
||||
val apiversion: String?,
|
||||
val configuration: ApiConfiguration?
|
||||
val version: String? = null,
|
||||
val apiversion: String? = null,
|
||||
val configuration: ApiConfiguration? = null
|
||||
) {
|
||||
fun getApiMajorVersion(): Int {
|
||||
var versionNumber = 0
|
||||
@ -54,9 +54,9 @@ class SelfossModel {
|
||||
@Serializable
|
||||
data class ApiConfiguration(
|
||||
@Serializable(with = BooleanSerializer::class)
|
||||
val publicMode: Boolean?,
|
||||
val publicMode: Boolean? = null,
|
||||
@Serializable(with = BooleanSerializer::class)
|
||||
val authEnabled: Boolean?
|
||||
val authEnabled: Boolean? = null
|
||||
) {
|
||||
fun isAuthEnabled() = authEnabled ?: true
|
||||
|
||||
@ -75,7 +75,7 @@ class SelfossModel {
|
||||
data class SourceStats(
|
||||
override val id: Int,
|
||||
override var title: String,
|
||||
override var unread: Int?,
|
||||
override var unread: Int? = null,
|
||||
override var error: String? = null,
|
||||
override var icon: String? = null
|
||||
) : Source
|
||||
@ -86,11 +86,11 @@ class SelfossModel {
|
||||
override var title: String,
|
||||
override var unread: Int? = null,
|
||||
@Serializable(with = TagsListSerializer::class)
|
||||
var tags: List<String>?,
|
||||
var spout: String?,
|
||||
override var error: String?,
|
||||
override var icon: String?,
|
||||
var params: SourceParams?
|
||||
var tags: List<String>? = null,
|
||||
var spout: String? = null,
|
||||
override var error: String? = null,
|
||||
override var icon: String? = null,
|
||||
var params: SourceParams? = null
|
||||
) : Source
|
||||
|
||||
@Serializable
|
||||
@ -107,13 +107,13 @@ class SelfossModel {
|
||||
var unread: Boolean,
|
||||
@Serializable(with = BooleanSerializer::class)
|
||||
var starred: Boolean,
|
||||
val thumbnail: String?,
|
||||
val icon: String?,
|
||||
val thumbnail: String? = null,
|
||||
val icon: String? = null,
|
||||
val link: String,
|
||||
val sourcetitle: String,
|
||||
@Serializable(with = TagsListSerializer::class)
|
||||
val tags: List<String>,
|
||||
val author: String?
|
||||
val author: String? = null
|
||||
) {
|
||||
fun getLinkDecoded(): String {
|
||||
var stringUrl: String
|
||||
|
@ -36,6 +36,7 @@ class SelfossApi(private val appSettingsService: AppSettingsService) {
|
||||
prettyPrint = true
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
explicitNulls = false
|
||||
})
|
||||
}
|
||||
install(Logging) {
|
||||
|
Reference in New Issue
Block a user