Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Add DecSync synchronization (#443) #696

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,8 @@ dependencies {
implementation 'net.dankito.readability4j:readability4j:1.0.5'
implementation 'pub.devrel:easypermissions:3.0.0'
implementation 'com.rometools:rome-opml:1.15.0'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0'
implementation 'org.decsync:libdecsync:1.8.1'
implementation 'com.nononsenseapps:filepicker:4.1.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
}
301 changes: 301 additions & 0 deletions app/schemas/net.frju.flym.data.AppDatabase/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
{
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "68944b920ee4a639a67bc8f29472e1b7",
"entities": [
{
"tableName": "feeds",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`feedId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `feedLink` TEXT NOT NULL, `feedTitle` TEXT, `feedImageLink` TEXT, `fetchError` INTEGER NOT NULL, `retrieveFullText` INTEGER NOT NULL, `isGroup` INTEGER NOT NULL, `groupId` INTEGER, `displayPriority` INTEGER NOT NULL, `lastManualActionUid` TEXT NOT NULL, FOREIGN KEY(`groupId`) REFERENCES `feeds`(`feedId`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "feedId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "link",
"columnName": "feedLink",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "feedTitle",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "imageLink",
"columnName": "feedImageLink",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "fetchError",
"columnName": "fetchError",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "retrieveFullText",
"columnName": "retrieveFullText",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isGroup",
"columnName": "isGroup",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "groupId",
"columnName": "groupId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "displayPriority",
"columnName": "displayPriority",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastManualActionUid",
"columnName": "lastManualActionUid",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"feedId"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_feeds_groupId",
"unique": false,
"columnNames": [
"groupId"
],
"createSql": "CREATE INDEX IF NOT EXISTS `index_feeds_groupId` ON `${TABLE_NAME}` (`groupId`)"
},
{
"name": "index_feeds_feedId_feedLink",
"unique": true,
"columnNames": [
"feedId",
"feedLink"
],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_feeds_feedId_feedLink` ON `${TABLE_NAME}` (`feedId`, `feedLink`)"
}
],
"foreignKeys": [
{
"table": "feeds",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"groupId"
],
"referencedColumns": [
"feedId"
]
}
]
},
{
"tableName": "entries",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `feedId` INTEGER NOT NULL, `link` TEXT, `uri` TEXT, `fetchDate` INTEGER NOT NULL, `publicationDate` INTEGER NOT NULL, `title` TEXT, `description` TEXT, `mobilizedContent` TEXT, `imageLink` TEXT, `author` TEXT, `read` INTEGER NOT NULL, `favorite` INTEGER NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`feedId`) REFERENCES `feeds`(`feedId`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "feedId",
"columnName": "feedId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "link",
"columnName": "link",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "uri",
"columnName": "uri",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "fetchDate",
"columnName": "fetchDate",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "publicationDate",
"columnName": "publicationDate",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mobilizedContent",
"columnName": "mobilizedContent",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "imageLink",
"columnName": "imageLink",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "author",
"columnName": "author",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "read",
"columnName": "read",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "favorite",
"columnName": "favorite",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": false
},
"indices": [
{
"name": "index_entries_feedId",
"unique": false,
"columnNames": [
"feedId"
],
"createSql": "CREATE INDEX IF NOT EXISTS `index_entries_feedId` ON `${TABLE_NAME}` (`feedId`)"
},
{
"name": "index_entries_link",
"unique": true,
"columnNames": [
"link"
],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_entries_link` ON `${TABLE_NAME}` (`link`)"
},
{
"name": "index_entries_uri",
"unique": true,
"columnNames": [
"uri"
],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_entries_uri` ON `${TABLE_NAME}` (`uri`)"
}
],
"foreignKeys": [
{
"table": "feeds",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"feedId"
],
"referencedColumns": [
"feedId"
]
}
]
},
{
"tableName": "tasks",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`entryId` TEXT NOT NULL, `imageLinkToDl` TEXT NOT NULL, `numberAttempt` INTEGER NOT NULL, PRIMARY KEY(`entryId`, `imageLinkToDl`), FOREIGN KEY(`entryId`) REFERENCES `entries`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "entryId",
"columnName": "entryId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "imageLinkToDl",
"columnName": "imageLinkToDl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "numberAttempt",
"columnName": "numberAttempt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"entryId",
"imageLinkToDl"
],
"autoGenerate": false
},
"indices": [
{
"name": "index_tasks_entryId",
"unique": false,
"columnNames": [
"entryId"
],
"createSql": "CREATE INDEX IF NOT EXISTS `index_tasks_entryId` ON `${TABLE_NAME}` (`entryId`)"
}
],
"foreignKeys": [
{
"table": "entries",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"entryId"
],
"referencedColumns": [
"id"
]
}
]
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '68944b920ee4a639a67bc8f29472e1b7')"
]
}
}
17 changes: 16 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true">
<activity
android:name="net.frju.flym.ui.main.MainActivity"
android:configChanges="orientation|screenSize"
Expand Down Expand Up @@ -118,6 +119,10 @@
android:label="@string/discover_search_label"
android:launchMode="singleTask"
android:parentActivityName="net.frju.flym.ui.main.MainActivity" />
<activity
android:name="com.nononsenseapps.filepicker.FilePickerActivity"
android:label="@string/app_name"
android:theme="@style/NNF_BaseTheme" />

<meta-data
android:name="com.samsung.android.icon_container.has_icon_container"
Expand All @@ -132,6 +137,16 @@
android:resource="@xml/file_paths" />
</provider>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/nnf_provider_paths" />
</provider>

<service
android:name="net.frju.flym.service.AutoRefreshJobService"
android:exported="true"
Expand Down
Loading