Compare commits
8 Commits
v123051301
...
v123051471
Author | SHA1 | Date | |
---|---|---|---|
7f96798f13 | |||
6e5704a45b | |||
495591159f | |||
718fe7c5ee | |||
ecd23213f9 | |||
e6baed8cb4 | |||
c87abec0b9 | |||
0aba41d8bf |
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,3 +1,25 @@
|
|||||||
|
**v123051331**
|
||||||
|
|
||||||
|
- fix: illegal input.
|
||||||
|
- Changelog for v123051321 [CI SKIP]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
|
**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**
|
**v123051211**
|
||||||
|
|
||||||
- fix: Sometimes url isn't even defined.
|
- fix: Sometimes url isn't even defined.
|
||||||
|
@ -74,7 +74,6 @@ class ReaderActivity : AppCompatActivity(), DIAware {
|
|||||||
try {
|
try {
|
||||||
readItem(allItems[currentItem])
|
readItem(allItems[currentItem])
|
||||||
} catch (e: IndexOutOfBoundsException) {
|
} catch (e: IndexOutOfBoundsException) {
|
||||||
e.sendSilentlyWithAcraWithName("out of bound > size = ${allItems.size} currentItem = $currentItem")
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,7 +530,12 @@ class ArticleFragment : Fragment(), DIAware {
|
|||||||
|
|
||||||
private fun openInBrowserAfterFailing() {
|
private fun openInBrowserAfterFailing() {
|
||||||
binding.progressBar.visibility = View.GONE
|
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 {
|
companion object {
|
||||||
@ -548,8 +553,8 @@ class ArticleFragment : Fragment(), DIAware {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun performClick(): Boolean {
|
fun performClick(): Boolean {
|
||||||
if (binding.webcontent.hitTestResult.type == WebView.HitTestResult.IMAGE_TYPE ||
|
if (allImages != null && (binding.webcontent.hitTestResult.type == WebView.HitTestResult.IMAGE_TYPE ||
|
||||||
binding.webcontent.hitTestResult.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE
|
binding.webcontent.hitTestResult.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val position: Int = allImages.indexOf(binding.webcontent.hitTestResult.extra)
|
val position: Int = allImages.indexOf(binding.webcontent.hitTestResult.extra)
|
||||||
|
@ -149,6 +149,7 @@ class FilterSheetFragment : BottomSheetDialogFragment(), DIAware {
|
|||||||
c.ellipsize = TextUtils.TruncateAt.END
|
c.ellipsize = TextUtils.TruncateAt.END
|
||||||
c.text = tag.tag
|
c.text = tag.tag
|
||||||
|
|
||||||
|
if (tag.color.isNotEmpty()) {
|
||||||
try {
|
try {
|
||||||
val gd = GradientDrawable()
|
val gd = GradientDrawable()
|
||||||
val gdColor = try {
|
val gdColor = try {
|
||||||
@ -165,6 +166,7 @@ class FilterSheetFragment : BottomSheetDialogFragment(), DIAware {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.sendSilentlyWithAcraWithName("tags > GradientDrawable")
|
e.sendSilentlyWithAcraWithName("tags > GradientDrawable")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
c.setOnCloseIconClickListener {
|
c.setOnCloseIconClickListener {
|
||||||
(it as Chip).isCloseIconVisible = false
|
(it as Chip).isCloseIconVisible = false
|
||||||
|
@ -6,12 +6,12 @@ class MercuryModel {
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
class ParsedContent(
|
class ParsedContent(
|
||||||
val title: String?,
|
val title: String? = null,
|
||||||
val content: String?,
|
val content: String? = null,
|
||||||
val lead_image_url: String?, // NOSONAR
|
val lead_image_url: String? = null, // NOSONAR
|
||||||
val url: String?,
|
val url: String? = null,
|
||||||
val error: Boolean?,
|
val error: Boolean? = null,
|
||||||
val message: String?,
|
val message: String? = null,
|
||||||
val failed: Boolean?
|
val failed: Boolean? = null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@ class SelfossModel {
|
|||||||
@Serializable
|
@Serializable
|
||||||
class Stats(
|
class Stats(
|
||||||
val total: Int,
|
val total: Int,
|
||||||
val unread: Int?,
|
val unread: Int? = null,
|
||||||
val starred: Int?
|
val starred: Int? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -36,9 +36,9 @@ class SelfossModel {
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ApiInformation(
|
data class ApiInformation(
|
||||||
val version: String?,
|
val version: String? = null,
|
||||||
val apiversion: String?,
|
val apiversion: String? = null,
|
||||||
val configuration: ApiConfiguration?
|
val configuration: ApiConfiguration? = null
|
||||||
) {
|
) {
|
||||||
fun getApiMajorVersion(): Int {
|
fun getApiMajorVersion(): Int {
|
||||||
var versionNumber = 0
|
var versionNumber = 0
|
||||||
@ -54,9 +54,9 @@ class SelfossModel {
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ApiConfiguration(
|
data class ApiConfiguration(
|
||||||
@Serializable(with = BooleanSerializer::class)
|
@Serializable(with = BooleanSerializer::class)
|
||||||
val publicMode: Boolean?,
|
val publicMode: Boolean? = null,
|
||||||
@Serializable(with = BooleanSerializer::class)
|
@Serializable(with = BooleanSerializer::class)
|
||||||
val authEnabled: Boolean?
|
val authEnabled: Boolean? = null
|
||||||
) {
|
) {
|
||||||
fun isAuthEnabled() = authEnabled ?: true
|
fun isAuthEnabled() = authEnabled ?: true
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class SelfossModel {
|
|||||||
data class SourceStats(
|
data class SourceStats(
|
||||||
override val id: Int,
|
override val id: Int,
|
||||||
override var title: String,
|
override var title: String,
|
||||||
override var unread: Int?,
|
override var unread: Int? = null,
|
||||||
override var error: String? = null,
|
override var error: String? = null,
|
||||||
override var icon: String? = null
|
override var icon: String? = null
|
||||||
) : Source
|
) : Source
|
||||||
@ -86,11 +86,11 @@ class SelfossModel {
|
|||||||
override var title: String,
|
override var title: String,
|
||||||
override var unread: Int? = null,
|
override var unread: Int? = null,
|
||||||
@Serializable(with = TagsListSerializer::class)
|
@Serializable(with = TagsListSerializer::class)
|
||||||
var tags: List<String>?,
|
var tags: List<String>? = null,
|
||||||
var spout: String?,
|
var spout: String? = null,
|
||||||
override var error: String?,
|
override var error: String? = null,
|
||||||
override var icon: String?,
|
override var icon: String? = null,
|
||||||
var params: SourceParams?
|
var params: SourceParams? = null
|
||||||
) : Source
|
) : Source
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -107,13 +107,13 @@ class SelfossModel {
|
|||||||
var unread: Boolean,
|
var unread: Boolean,
|
||||||
@Serializable(with = BooleanSerializer::class)
|
@Serializable(with = BooleanSerializer::class)
|
||||||
var starred: Boolean,
|
var starred: Boolean,
|
||||||
val thumbnail: String?,
|
val thumbnail: String? = null,
|
||||||
val icon: String?,
|
val icon: String? = null,
|
||||||
val link: String,
|
val link: String,
|
||||||
val sourcetitle: String,
|
val sourcetitle: String,
|
||||||
@Serializable(with = TagsListSerializer::class)
|
@Serializable(with = TagsListSerializer::class)
|
||||||
val tags: List<String>,
|
val tags: List<String>,
|
||||||
val author: String?
|
val author: String? = null
|
||||||
) {
|
) {
|
||||||
fun getLinkDecoded(): String {
|
fun getLinkDecoded(): String {
|
||||||
var stringUrl: String
|
var stringUrl: String
|
||||||
|
@ -36,6 +36,7 @@ class SelfossApi(private val appSettingsService: AppSettingsService) {
|
|||||||
prettyPrint = true
|
prettyPrint = true
|
||||||
isLenient = true
|
isLenient = true
|
||||||
ignoreUnknownKeys = true
|
ignoreUnknownKeys = true
|
||||||
|
explicitNulls = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
install(Logging) {
|
install(Logging) {
|
||||||
|
Reference in New Issue
Block a user