Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark as Read on Open and Scroll #1025

Merged
merged 27 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
beb6fba
Mark as read on open and scroll option
IzakJoubert Jul 12, 2023
897a447
Mark as read on open and scroll option
IzakJoubert Jul 12, 2023
a62f335
Merge branch 'main' into issue/403
ZJouba Jul 12, 2023
286175b
Fixing mark all
IzakJoubert Jul 12, 2023
d1df954
Merge branch 'issue/403' of https://github.com/ZJouba/jerboa into iss…
IzakJoubert Jul 12, 2023
cdb4ee1
Merge branch 'main' into issue/403
IzakJoubert Jul 12, 2023
1a9860f
Update Http.kt
ZJouba Jul 12, 2023
8a23a7e
Merge branch 'main' into issue/403
ZJouba Jul 13, 2023
96f35c3
Update Home in PostActivity
IzakJoubert Jul 13, 2023
37b251c
Merge branch 'main' into issue/403
ZJouba Jul 13, 2023
6dab5b6
Updates and merge conflict fixes
IzakJoubert Jul 20, 2023
f297596
Merged main
IzakJoubert Jul 20, 2023
c6aa4a9
Merge remote-tracking branch 'upstream/main' into issue/403
IzakJoubert Jul 24, 2023
4d4375f
Merge branch 'main' into issue/403
ZJouba Jul 27, 2023
ccd7f46
Check if read first and use appState to launch coroutine
IzakJoubert Jul 27, 2023
7d6c6d8
Adding back migration
IzakJoubert Jul 27, 2023
1083197
Removing dev
IzakJoubert Jul 27, 2023
29dd480
Removing unused functions
IzakJoubert Jul 28, 2023
e7987ee
Merge branch 'main' into issue/403
ZJouba Jul 28, 2023
94190d1
Merge remote-tracking branch 'upstream/main' into issue/403
IzakJoubert Aug 3, 2023
2d964eb
Fixing merge conflicts
IzakJoubert Aug 3, 2023
b5de940
Fixing migration
IzakJoubert Aug 3, 2023
74300ac
New account check
IzakJoubert Aug 3, 2023
942b810
Merging ifs
IzakJoubert Aug 3, 2023
92d3a96
Removed manual mark as read
IzakJoubert Aug 3, 2023
0e2576c
Only for Accounts
IzakJoubert Aug 3, 2023
690f4b5
Trigger woodpecker
IzakJoubert Aug 3, 2023
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
232 changes: 232 additions & 0 deletions app/schemas/com.jerboa.db.AppDB/23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
{
"formatVersion": 1,
"database": {
"version": 23,
"identityHash": "cb557db7205cb6ae333d14fbcd156c30",
"entities": [
{
"tableName": "Account",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `current` INTEGER NOT NULL, `instance` TEXT NOT NULL, `name` TEXT NOT NULL, `jwt` TEXT NOT NULL, `default_listing_type` INTEGER NOT NULL DEFAULT 0, `default_sort_type` INTEGER NOT NULL DEFAULT 0, `verification_state` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "current",
"columnName": "current",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "instance",
"columnName": "instance",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "jwt",
"columnName": "jwt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "defaultListingType",
"columnName": "default_listing_type",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "defaultSortType",
"columnName": "default_sort_type",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "verificationState",
"columnName": "verification_state",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "AppSettings",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `font_size` INTEGER NOT NULL DEFAULT 16, `theme` INTEGER NOT NULL DEFAULT 0, `theme_color` INTEGER NOT NULL DEFAULT 0, `viewed_changelog` INTEGER NOT NULL DEFAULT 0, `post_view_mode` INTEGER NOT NULL DEFAULT 0, `show_bottom_nav` INTEGER NOT NULL DEFAULT 1, `show_collapsed_comment_content` INTEGER NOT NULL DEFAULT 0, `show_comment_action_bar_by_default` INTEGER NOT NULL DEFAULT 1, `show_voting_arrows_in_list_view` INTEGER NOT NULL DEFAULT 1, `show_parent_comment_navigation_buttons` INTEGER NOT NULL DEFAULT 0, `navigate_parent_comments_with_volume_buttons` INTEGER NOT NULL DEFAULT 0, `use_custom_tabs` INTEGER NOT NULL DEFAULT 1, `use_private_tabs` INTEGER NOT NULL DEFAULT 0, `secure_window` INTEGER NOT NULL DEFAULT 0, `blur_nsfw` INTEGER NOT NULL DEFAULT 1, `show_text_descriptions_in_navbar` INTEGER NOT NULL DEFAULT 1, `markAsReadOnScroll` INTEGER NOT NULL DEFAULT 0, `backConfirmationMode` INTEGER NOT NULL DEFAULT 1, `show_post_link_previews` INTEGER NOT NULL DEFAULT 1)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "fontSize",
"columnName": "font_size",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "16"
},
{
"fieldPath": "theme",
"columnName": "theme",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "themeColor",
"columnName": "theme_color",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "viewedChangelog",
"columnName": "viewed_changelog",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "postViewMode",
"columnName": "post_view_mode",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "showBottomNav",
"columnName": "show_bottom_nav",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "showCollapsedCommentContent",
"columnName": "show_collapsed_comment_content",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "showCommentActionBarByDefault",
"columnName": "show_comment_action_bar_by_default",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "showVotingArrowsInListView",
"columnName": "show_voting_arrows_in_list_view",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "showParentCommentNavigationButtons",
"columnName": "show_parent_comment_navigation_buttons",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "navigateParentCommentsWithVolumeButtons",
"columnName": "navigate_parent_comments_with_volume_buttons",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "useCustomTabs",
"columnName": "use_custom_tabs",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "usePrivateTabs",
"columnName": "use_private_tabs",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "secureWindow",
"columnName": "secure_window",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "blurNSFW",
"columnName": "blur_nsfw",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "showTextDescriptionsInNavbar",
"columnName": "show_text_descriptions_in_navbar",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "markAsReadOnScroll",
"columnName": "markAsReadOnScroll",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "backConfirmationMode",
"columnName": "backConfirmationMode",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
},
{
"fieldPath": "showPostLinkPreviews",
"columnName": "show_post_link_previews",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "1"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"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, 'cb557db7205cb6ae333d14fbcd156c30')"
]
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/com/jerboa/db/AppDB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ val APP_SETTINGS_DEFAULT = AppSettings(
)

@Database(
version = 22,
version = 23,
entities = [Account::class, AppSettings::class],
exportSchema = true,
)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/jerboa/db/AppDBMigrations.kt
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ val MIGRATION_22_21 = object : Migration(22, 21) {
}
}

val MIGRATION_21_22 = object : Migration(21, 22) {
val MIGRATION_22_23 = object : Migration(21, 22) {
ZJouba marked this conversation as resolved.
Show resolved Hide resolved
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL(UPDATE_APP_CHANGELOG_UNVIEWED)
database.execSQL(
Expand Down Expand Up @@ -320,5 +320,5 @@ val MIGRATIONS_LIST = arrayOf(
MIGRATION_20_21,
MIGRATION_21_22,
MIGRATION_22_21,
MIGRATION_21_22,
MIGRATION_22_23,
)