Compare commits
No commits in common. "a094d88799d37ef56850427df9b6a05702ed11aa" and "27eafe4ff404b23dfac5734a9d39bf082a13dd14" have entirely different histories.
a094d88799
...
27eafe4ff4
@ -46,7 +46,7 @@ data class ParecelableItem(
|
||||
val link: String,
|
||||
val sourcetitle: String,
|
||||
val tags: String,
|
||||
val author: String?
|
||||
val author: String
|
||||
) : Parcelable {
|
||||
|
||||
companion object {
|
||||
|
@ -73,7 +73,7 @@ class SelfossModel {
|
||||
val sourcetitle: String,
|
||||
@Serializable(with = TagsListSerializer::class)
|
||||
val tags: List<String>,
|
||||
val author: String?
|
||||
val author: String
|
||||
) {
|
||||
// TODO: maybe find a better way to handle these kind of urls
|
||||
fun getLinkDecoded(): String {
|
||||
@ -104,7 +104,7 @@ class SelfossModel {
|
||||
|
||||
fun sourceAuthorAndDate(): String {
|
||||
var txt = this.sourcetitle.getHtmlDecoded()
|
||||
if (!this.author.isNullOrBlank()) {
|
||||
if (this.author.isNotEmpty()) {
|
||||
txt += " (by ${this.author}) "
|
||||
}
|
||||
txt += DateUtils.parseRelativeDate(this.datetime)
|
||||
|
@ -511,7 +511,6 @@ class Repository(
|
||||
item.link,
|
||||
item.sourcetitle,
|
||||
item.tags.joinToString(","),
|
||||
item.author,
|
||||
item.id.toString()
|
||||
)
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
CREATE TABLE ITEM_BACKUP AS SELECT `id`, `datetime`, `title`, `content`,
|
||||
`unread`, `starred`, `thumbnail`, `icon`, `link`, `sourcetitle`,
|
||||
`tags` FROM ITEM;
|
||||
ALTER TABLE ITEM_BACKUP ADD COLUMN `author` TEXT;
|
||||
DROP TABLE ITEM;
|
||||
ALTER TABLE ITEM_BACKUP RENAME TO ITEM;
|
@ -10,7 +10,7 @@ CREATE TABLE ITEM (
|
||||
`link` TEXT NOT NULL,
|
||||
`sourcetitle` TEXT NOT NULL,
|
||||
`tags` TEXT NOT NULL,
|
||||
`author` TEXT,
|
||||
`author` TEXT NOT NULL,
|
||||
PRIMARY KEY(`id`)
|
||||
);
|
||||
|
||||
@ -31,4 +31,4 @@ deleteItemsWhereSource:
|
||||
DELETE FROM ITEM WHERE `sourcetitle` = ?;
|
||||
|
||||
updateItem:
|
||||
UPDATE ITEM SET `datetime` = ?, `title` = ?, `content` = ?, `unread` = ?, `starred` = ?, `thumbnail` = ?, `icon` = ?, `link` = ?, `sourcetitle` = ?, `tags` = ?, `author` = ? WHERE `id` = ?;
|
||||
UPDATE ITEM SET `datetime` = ?, `title` = ?, `content` = ?, `unread` = ?, `starred` = ?, `thumbnail` = ?, `icon` = ?, `link` = ?, `sourcetitle` = ?, `tags` = ? WHERE `id` = ?;
|
Loading…
Reference in New Issue
Block a user