Still fixing selfoss version issues.

This commit is contained in:
Amine 2018-11-05 21:11:25 +01:00
parent 32e2d05014
commit 7e520e9bed
3 changed files with 7 additions and 3 deletions

View File

@ -735,6 +735,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
}
override fun onFailure(call: Call<List<Source>>?, t: Throwable?) {
val apiDrawerData = DrawerData(tags, null)
if ((maybeDrawerData != null && maybeDrawerData != apiDrawerData) || maybeDrawerData == null) {
handleDrawerData(apiDrawerData)
}
}
})
}

View File

@ -45,7 +45,7 @@ data class Spout(
data class Source(
@SerializedName("id") val id: String,
@SerializedName("title") val title: String,
@SerializedName("tags") val tags: String,
@SerializedName("tags") val tags: SelfossTagType,
@SerializedName("spout") val spout: String,
@SerializedName("error") val error: String,
@SerializedName("icon") val icon: String

View File

@ -19,7 +19,7 @@ fun SourceEntity.toView(): Source =
Source(
this.id,
this.title,
this.tags,
SelfossTagType(this.tags),
this.spout,
this.error,
this.icon
@ -29,7 +29,7 @@ fun Source.toEntity(): SourceEntity =
SourceEntity(
this.id,
this.title,
this.tags,
this.tags.tags,
this.spout,
this.error,
this.icon.orEmpty()