From cb9661bc56926335c9df6a63ecaea21e94a509c7 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 28 Feb 2022 01:34:44 -0600 Subject: [PATCH] Move radius from geofence to place --- .../com.todoroo.astrid.dao.Database/83.json | 1371 +++++++++++++++++ .../java/org/tasks/makers/GeofenceMaker.kt | 2 - .../java/com/todoroo/astrid/dao/Database.kt | 49 +- .../todoroo/astrid/service/TaskDuplicator.kt | 2 +- .../tasks/activities/PlaceSettingsActivity.kt | 26 +- .../org/tasks/backup/TasksJsonImporter.kt | 1 - app/src/main/java/org/tasks/data/Geofence.kt | 16 +- app/src/main/java/org/tasks/data/Location.kt | 2 +- .../main/java/org/tasks/data/LocationDao.kt | 3 +- .../java/org/tasks/data/MergedGeofence.kt | 6 +- app/src/main/java/org/tasks/data/Place.kt | 23 +- app/src/main/java/org/tasks/db/Migrations.kt | 8 + .../org/tasks/dialogs/GeofenceDialog.java | 16 - .../java/org/tasks/ui/LocationControlSet.kt | 5 +- .../res/layout/activity_location_settings.xml | 34 +- app/src/main/res/layout/location_details.xml | 23 +- app/src/main/res/values-ar/strings.xml | 1 - app/src/main/res/values-bg-rBG/strings.xml | 1 - app/src/main/res/values-ca/strings.xml | 1 - app/src/main/res/values-cs/strings.xml | 1 - app/src/main/res/values-da/strings.xml | 1 - app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-eo/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-et/strings.xml | 1 - app/src/main/res/values-eu/strings.xml | 1 - app/src/main/res/values-fi/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-hr/strings.xml | 1 - app/src/main/res/values-hu/strings.xml | 1 - app/src/main/res/values-id/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-iw/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-ko/strings.xml | 1 - app/src/main/res/values-lt/strings.xml | 1 - app/src/main/res/values-nb/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-pt/strings.xml | 1 - app/src/main/res/values-ro/strings.xml | 1 - app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values-si/strings.xml | 1 - app/src/main/res/values-sk/strings.xml | 1 - app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values-ta/strings.xml | 1 - app/src/main/res/values-th/strings.xml | 1 - app/src/main/res/values-tr/strings.xml | 1 - app/src/main/res/values-uk/strings.xml | 1 - app/src/main/res/values-ur/strings.xml | 1 - app/src/main/res/values-vi/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values-zh-rTW/strings.xml | 1 - app/src/main/res/values/keys.xml | 1 - app/src/main/res/values/strings.xml | 1 - .../res/xml/preferences_task_defaults.xml | 9 - 57 files changed, 1490 insertions(+), 146 deletions(-) create mode 100644 app/schemas/com.todoroo.astrid.dao.Database/83.json diff --git a/app/schemas/com.todoroo.astrid.dao.Database/83.json b/app/schemas/com.todoroo.astrid.dao.Database/83.json new file mode 100644 index 000000000..38fe353e7 --- /dev/null +++ b/app/schemas/com.todoroo.astrid.dao.Database/83.json @@ -0,0 +1,1371 @@ +{ + "formatVersion": 1, + "database": { + "version": 83, + "identityHash": "63f86a7965511d8f19651de927905a5f", + "entities": [ + { + "tableName": "notification", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `type` INTEGER NOT NULL, `location` INTEGER)", + "fields": [ + { + "fieldPath": "uid", + "columnName": "uid", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "taskId", + "columnName": "task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "timestamp", + "columnName": "timestamp", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "location", + "columnName": "location", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "uid" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_notification_task", + "unique": true, + "columnNames": [ + "task" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_notification_task` ON `${TABLE_NAME}` (`task`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "tagdata", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `remoteId` TEXT, `name` TEXT, `color` INTEGER, `tagOrdering` TEXT, `td_icon` INTEGER, `td_order` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remoteId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "color", + "columnName": "color", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "tagOrdering", + "columnName": "tagOrdering", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "icon", + "columnName": "td_icon", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "order", + "columnName": "td_order", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "userActivity", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `remoteId` TEXT, `message` TEXT, `picture` TEXT, `target_id` TEXT, `created_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remoteId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "message", + "columnName": "message", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "picture", + "columnName": "picture", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "targetId", + "columnName": "target_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "created", + "columnName": "created_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "task_attachments", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `remoteId` TEXT, `task_id` TEXT, `name` TEXT, `path` TEXT, `content_type` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remoteId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "taskId", + "columnName": "task_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uri", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "task_list_metadata", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `remoteId` TEXT, `tag_uuid` TEXT, `filter` TEXT, `task_ids` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remoteId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tagUuid", + "columnName": "tag_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filter", + "columnName": "filter", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "taskIds", + "columnName": "task_ids", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "tasks", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT, `importance` INTEGER NOT NULL, `dueDate` INTEGER NOT NULL, `hideUntil` INTEGER NOT NULL, `created` INTEGER NOT NULL, `modified` INTEGER NOT NULL, `completed` INTEGER NOT NULL, `deleted` INTEGER NOT NULL, `notes` TEXT, `estimatedSeconds` INTEGER NOT NULL, `elapsedSeconds` INTEGER NOT NULL, `timerStart` INTEGER NOT NULL, `notificationFlags` INTEGER NOT NULL, `notifications` INTEGER NOT NULL, `lastNotified` INTEGER NOT NULL, `snoozeTime` INTEGER NOT NULL, `recurrence` TEXT, `repeatUntil` INTEGER NOT NULL, `calendarUri` TEXT, `remoteId` TEXT, `collapsed` INTEGER NOT NULL, `parent` INTEGER NOT NULL, `parent_uuid` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "priority", + "columnName": "importance", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "dueDate", + "columnName": "dueDate", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "hideUntil", + "columnName": "hideUntil", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "creationDate", + "columnName": "created", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "modificationDate", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "completionDate", + "columnName": "completed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deletionDate", + "columnName": "deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "notes", + "columnName": "notes", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "estimatedSeconds", + "columnName": "estimatedSeconds", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "elapsedSeconds", + "columnName": "elapsedSeconds", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "timerStart", + "columnName": "timerStart", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "ringFlags", + "columnName": "notificationFlags", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "reminderPeriod", + "columnName": "notifications", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "reminderLast", + "columnName": "lastNotified", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "reminderSnooze", + "columnName": "snoozeTime", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "recurrence", + "columnName": "recurrence", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "repeatUntil", + "columnName": "repeatUntil", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "calendarURI", + "columnName": "calendarUri", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remoteId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isCollapsed", + "columnName": "collapsed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "parentUuid", + "columnName": "parent_uuid", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "t_rid", + "unique": true, + "columnNames": [ + "remoteId" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `t_rid` ON `${TABLE_NAME}` (`remoteId`)" + }, + { + "name": "active_and_visible", + "unique": false, + "columnNames": [ + "completed", + "deleted", + "hideUntil" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `active_and_visible` ON `${TABLE_NAME}` (`completed`, `deleted`, `hideUntil`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "alarms", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task` INTEGER NOT NULL, `time` INTEGER NOT NULL, `type` INTEGER NOT NULL DEFAULT 0, `repeat` INTEGER NOT NULL DEFAULT 0, `interval` INTEGER NOT NULL DEFAULT 0)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "task", + "columnName": "task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "time", + "columnName": "time", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "repeat", + "columnName": "repeat", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "interval", + "columnName": "interval", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "places", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`place_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `uid` TEXT, `name` TEXT, `address` TEXT, `phone` TEXT, `url` TEXT, `latitude` REAL NOT NULL, `longitude` REAL NOT NULL, `place_color` INTEGER NOT NULL, `place_icon` INTEGER NOT NULL, `place_order` INTEGER NOT NULL, `radius` INTEGER NOT NULL DEFAULT 250)", + "fields": [ + { + "fieldPath": "id", + "columnName": "place_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uid", + "columnName": "uid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "address", + "columnName": "address", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "phone", + "columnName": "phone", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "latitude", + "columnName": "latitude", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "longitude", + "columnName": "longitude", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "color", + "columnName": "place_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "icon", + "columnName": "place_icon", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "order", + "columnName": "place_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "radius", + "columnName": "radius", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "250" + } + ], + "primaryKey": { + "columnNames": [ + "place_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "place_uid", + "unique": true, + "columnNames": [ + "uid" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `place_uid` ON `${TABLE_NAME}` (`uid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "geofences", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`geofence_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task` INTEGER NOT NULL, `place` TEXT, `arrival` INTEGER NOT NULL, `departure` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "geofence_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "task", + "columnName": "task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "place", + "columnName": "place", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isArrival", + "columnName": "arrival", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isDeparture", + "columnName": "departure", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "geofence_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "geo_task", + "unique": false, + "columnNames": [ + "task" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `geo_task` ON `${TABLE_NAME}` (`task`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "tags", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task` INTEGER NOT NULL, `name` TEXT, `tag_uid` TEXT, `task_uid` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "task", + "columnName": "task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tagUid", + "columnName": "tag_uid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "taskUid", + "columnName": "task_uid", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "tag_task", + "unique": false, + "columnNames": [ + "task" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `tag_task` ON `${TABLE_NAME}` (`task`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "google_tasks", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`gt_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `gt_task` INTEGER NOT NULL, `gt_remote_id` TEXT, `gt_list_id` TEXT, `gt_parent` INTEGER NOT NULL, `gt_remote_parent` TEXT, `gt_moved` INTEGER NOT NULL, `gt_order` INTEGER NOT NULL, `gt_remote_order` INTEGER NOT NULL, `gt_last_sync` INTEGER NOT NULL, `gt_deleted` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "gt_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "task", + "columnName": "gt_task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "remoteId", + "columnName": "gt_remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "listId", + "columnName": "gt_list_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "gt_parent", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "remoteParent", + "columnName": "gt_remote_parent", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isMoved", + "columnName": "gt_moved", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "order", + "columnName": "gt_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "remoteOrder", + "columnName": "gt_remote_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "lastSync", + "columnName": "gt_last_sync", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deleted", + "columnName": "gt_deleted", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "gt_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "gt_task", + "unique": false, + "columnNames": [ + "gt_task" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `gt_task` ON `${TABLE_NAME}` (`gt_task`)" + }, + { + "name": "gt_list_parent", + "unique": false, + "columnNames": [ + "gt_list_id", + "gt_parent" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `gt_list_parent` ON `${TABLE_NAME}` (`gt_list_id`, `gt_parent`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "filters", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT, `sql` TEXT, `values` TEXT, `criterion` TEXT, `f_color` INTEGER, `f_icon` INTEGER, `f_order` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sql", + "columnName": "sql", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "values", + "columnName": "values", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "criterion", + "columnName": "criterion", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "color", + "columnName": "f_color", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "icon", + "columnName": "f_icon", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "order", + "columnName": "f_order", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "google_task_lists", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`gtl_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `gtl_account` TEXT, `gtl_remote_id` TEXT, `gtl_title` TEXT, `gtl_remote_order` INTEGER NOT NULL, `gtl_last_sync` INTEGER NOT NULL, `gtl_color` INTEGER, `gtl_icon` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "gtl_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "account", + "columnName": "gtl_account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "gtl_remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "title", + "columnName": "gtl_title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "order", + "columnName": "gtl_remote_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "lastSync", + "columnName": "gtl_last_sync", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "color", + "columnName": "gtl_color", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "icon", + "columnName": "gtl_icon", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "gtl_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "caldav_lists", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`cdl_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `cdl_account` TEXT, `cdl_uuid` TEXT, `cdl_name` TEXT, `cdl_color` INTEGER NOT NULL, `cdl_ctag` TEXT, `cdl_url` TEXT, `cdl_icon` INTEGER, `cdl_order` INTEGER NOT NULL, `cdl_access` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "cdl_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "account", + "columnName": "cdl_account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uuid", + "columnName": "cdl_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "cdl_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "color", + "columnName": "cdl_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "ctag", + "columnName": "cdl_ctag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "cdl_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "icon", + "columnName": "cdl_icon", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "order", + "columnName": "cdl_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "access", + "columnName": "cdl_access", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "cdl_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "caldav_tasks", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`cd_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `cd_task` INTEGER NOT NULL, `cd_calendar` TEXT, `cd_object` TEXT, `cd_remote_id` TEXT, `cd_etag` TEXT, `cd_last_sync` INTEGER NOT NULL, `cd_deleted` INTEGER NOT NULL, `cd_remote_parent` TEXT, `cd_order` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "cd_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "task", + "columnName": "cd_task", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "calendar", + "columnName": "cd_calendar", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "object", + "columnName": "cd_object", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "cd_remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "cd_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSync", + "columnName": "cd_last_sync", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deleted", + "columnName": "cd_deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "remoteParent", + "columnName": "cd_remote_parent", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "order", + "columnName": "cd_order", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "cd_id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "cd_task", + "unique": false, + "columnNames": [ + "cd_task" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `cd_task` ON `${TABLE_NAME}` (`cd_task`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "caldav_accounts", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`cda_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `cda_uuid` TEXT, `cda_name` TEXT, `cda_url` TEXT, `cda_username` TEXT, `cda_password` TEXT, `cda_error` TEXT, `cda_repeat` INTEGER NOT NULL, `cda_encryption_key` TEXT, `cda_account_type` INTEGER NOT NULL, `cda_collapsed` INTEGER NOT NULL, `cda_server_type` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "cda_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uuid", + "columnName": "cda_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "cda_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "cda_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "username", + "columnName": "cda_username", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "password", + "columnName": "cda_password", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "error", + "columnName": "cda_error", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isSuppressRepeatingTasks", + "columnName": "cda_repeat", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "encryptionKey", + "columnName": "cda_encryption_key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountType", + "columnName": "cda_account_type", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isCollapsed", + "columnName": "cda_collapsed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "serverType", + "columnName": "cda_server_type", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "cda_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "google_task_accounts", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`gta_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `gta_account` TEXT, `gta_error` TEXT, `gta_etag` TEXT, `gta_collapsed` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "gta_id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "account", + "columnName": "gta_account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "error", + "columnName": "gta_error", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "gta_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isCollapsed", + "columnName": "gta_collapsed", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "gta_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "principals", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `account` INTEGER NOT NULL, `href` TEXT NOT NULL, `email` TEXT, `display_name` TEXT, FOREIGN KEY(`account`) REFERENCES `caldav_accounts`(`cda_id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "href", + "columnName": "href", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "email", + "columnName": "email", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "displayName", + "columnName": "display_name", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_principals_account_href", + "unique": true, + "columnNames": [ + "account", + "href" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_principals_account_href` ON `${TABLE_NAME}` (`account`, `href`)" + } + ], + "foreignKeys": [ + { + "table": "caldav_accounts", + "onDelete": "CASCADE", + "onUpdate": "NO ACTION", + "columns": [ + "account" + ], + "referencedColumns": [ + "cda_id" + ] + } + ] + }, + { + "tableName": "principal_access", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `principal` INTEGER NOT NULL, `list` INTEGER NOT NULL, `invite` INTEGER NOT NULL, `access` INTEGER NOT NULL, FOREIGN KEY(`principal`) REFERENCES `principals`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`list`) REFERENCES `caldav_lists`(`cdl_id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "principal", + "columnName": "principal", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "list", + "columnName": "list", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "invite", + "columnName": "invite", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "access", + "columnName": "access", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_principal_access_list_principal", + "unique": true, + "columnNames": [ + "list", + "principal" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_principal_access_list_principal` ON `${TABLE_NAME}` (`list`, `principal`)" + }, + { + "name": "index_principal_access_principal", + "unique": false, + "columnNames": [ + "principal" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `index_principal_access_principal` ON `${TABLE_NAME}` (`principal`)" + } + ], + "foreignKeys": [ + { + "table": "principals", + "onDelete": "CASCADE", + "onUpdate": "NO ACTION", + "columns": [ + "principal" + ], + "referencedColumns": [ + "id" + ] + }, + { + "table": "caldav_lists", + "onDelete": "CASCADE", + "onUpdate": "NO ACTION", + "columns": [ + "list" + ], + "referencedColumns": [ + "cdl_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, '63f86a7965511d8f19651de927905a5f')" + ] + } +} \ No newline at end of file diff --git a/app/src/commonTest/java/org/tasks/makers/GeofenceMaker.kt b/app/src/commonTest/java/org/tasks/makers/GeofenceMaker.kt index 1e5346972..900cd0d8c 100644 --- a/app/src/commonTest/java/org/tasks/makers/GeofenceMaker.kt +++ b/app/src/commonTest/java/org/tasks/makers/GeofenceMaker.kt @@ -11,7 +11,6 @@ object GeofenceMaker { val TASK: Property = Property.newProperty() val ARRIVAL: Property = Property.newProperty() val DEPARTURE: Property = Property.newProperty() - val RADIUS: Property = Property.newProperty() private val instantiator = Instantiator { lookup: PropertyLookup -> val geofence = Geofence() @@ -19,7 +18,6 @@ object GeofenceMaker { geofence.task = lookup.valueOf(TASK, 1) geofence.isArrival = lookup.valueOf(ARRIVAL, false) geofence.isDeparture = lookup.valueOf(DEPARTURE, false) - geofence.radius = lookup.valueOf(RADIUS, 250) geofence } diff --git a/app/src/main/java/com/todoroo/astrid/dao/Database.kt b/app/src/main/java/com/todoroo/astrid/dao/Database.kt index cc58b1029..97928758e 100644 --- a/app/src/main/java/com/todoroo/astrid/dao/Database.kt +++ b/app/src/main/java/com/todoroo/astrid/dao/Database.kt @@ -1,5 +1,6 @@ package com.todoroo.astrid.dao +import androidx.room.AutoMigration import androidx.room.Database import androidx.room.RoomDatabase import com.todoroo.astrid.data.Task @@ -36,32 +37,36 @@ import org.tasks.data.TaskListMetadataDao import org.tasks.data.UpgraderDao import org.tasks.data.UserActivity import org.tasks.data.UserActivityDao +import org.tasks.db.Migrations import org.tasks.notifications.Notification import org.tasks.notifications.NotificationDao @Database( - entities = [ - Notification::class, - TagData::class, - UserActivity::class, - TaskAttachment::class, - TaskListMetadata::class, - Task::class, - Alarm::class, - Place::class, - Geofence::class, - Tag::class, - GoogleTask::class, - Filter::class, - GoogleTaskList::class, - CaldavCalendar::class, - CaldavTask::class, - CaldavAccount::class, - GoogleTaskAccount::class, - Principal::class, - PrincipalAccess::class - ], - version = 82 + entities = [ + Notification::class, + TagData::class, + UserActivity::class, + TaskAttachment::class, + TaskListMetadata::class, + Task::class, + Alarm::class, + Place::class, + Geofence::class, + Tag::class, + GoogleTask::class, + Filter::class, + GoogleTaskList::class, + CaldavCalendar::class, + CaldavTask::class, + CaldavAccount::class, + GoogleTaskAccount::class, + Principal::class, + PrincipalAccess::class + ], + autoMigrations = [ + AutoMigration(from = 82, to = 83, spec = Migrations.AutoMigrate82to83::class), + ], + version = 83 ) abstract class Database : RoomDatabase() { abstract fun notificationDao(): NotificationDao diff --git a/app/src/main/java/com/todoroo/astrid/service/TaskDuplicator.kt b/app/src/main/java/com/todoroo/astrid/service/TaskDuplicator.kt index 89bca86bd..a50947575 100644 --- a/app/src/main/java/com/todoroo/astrid/service/TaskDuplicator.kt +++ b/app/src/main/java/com/todoroo/astrid/service/TaskDuplicator.kt @@ -75,7 +75,7 @@ class TaskDuplicator @Inject constructor( } for (g in locationDao.getGeofencesForTask(originalId)) { locationDao.insert( - Geofence(clone.id, g.place, g.isArrival, g.isDeparture, g.radius)) + Geofence(clone.id, g.place, g.isArrival, g.isDeparture)) } val alarms = alarmDao.getAlarms(originalId) if (alarms.isNotEmpty()) { diff --git a/app/src/main/java/org/tasks/activities/PlaceSettingsActivity.kt b/app/src/main/java/org/tasks/activities/PlaceSettingsActivity.kt index f4d4f4f03..e3473e12d 100644 --- a/app/src/main/java/org/tasks/activities/PlaceSettingsActivity.kt +++ b/app/src/main/java/org/tasks/activities/PlaceSettingsActivity.kt @@ -4,6 +4,7 @@ import android.app.Activity import android.content.Intent import android.os.Bundle import androidx.core.widget.addTextChangedListener +import com.google.android.material.slider.Slider import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputLayout import com.todoroo.astrid.activity.MainActivity @@ -15,23 +16,30 @@ import org.tasks.data.LocationDao import org.tasks.data.Place import org.tasks.databinding.ActivityLocationSettingsBinding import org.tasks.filters.PlaceFilter +import org.tasks.locale.Locale import org.tasks.location.MapFragment import org.tasks.preferences.Preferences import javax.inject.Inject +import kotlin.math.roundToInt @AndroidEntryPoint class PlaceSettingsActivity : BaseListSettingsActivity(), MapFragment.MapFragmentCallback { companion object { const val EXTRA_PLACE = "extra_place" + private const val MIN_RADIUS = 75 + private const val MAX_RADIUS = 1000 + private const val STEP = 25.0 } private lateinit var name: TextInputEditText private lateinit var nameLayout: TextInputLayout + private lateinit var slider: Slider @Inject lateinit var locationDao: LocationDao @Inject lateinit var map: MapFragment @Inject lateinit var preferences: Preferences + @Inject lateinit var locale: Locale private lateinit var place: Place @@ -53,7 +61,7 @@ class PlaceSettingsActivity : BaseListSettingsActivity(), MapFragment.MapFragmen if (savedInstanceState == null) { name.setText(place.displayName) selectedColor = place.color - selectedIcon = place.getIcon()!! + selectedIcon = place.getIcon() } val dark = preferences.mapTheme == 2 @@ -71,12 +79,25 @@ class PlaceSettingsActivity : BaseListSettingsActivity(), MapFragment.MapFragmen ) } nameLayout = it.nameLayout + slider = it.slider.apply { + setLabelFormatter { value -> + getString( + R.string.location_radius_meters, + locale.formatNumber(value.toInt()) + ) + } + valueTo = MAX_RADIUS.toFloat() + valueFrom = MIN_RADIUS.toFloat() + stepSize = STEP.toFloat() + haloRadius = 0 + value = (place.radius / STEP * STEP).roundToInt().toFloat() + } it.root } override fun hasChanges() = name.text.toString() != place.displayName || selectedColor != place.color - || selectedIcon != place.getIcon()!! + || selectedIcon != place.getIcon() override suspend fun save() { val newName: String = name.text.toString() @@ -89,6 +110,7 @@ class PlaceSettingsActivity : BaseListSettingsActivity(), MapFragment.MapFragmen place.name = newName place.color = selectedColor place.setIcon(selectedIcon) + place.radius = slider.value.toInt() locationDao.update(place) setResult( Activity.RESULT_OK, diff --git a/app/src/main/java/org/tasks/backup/TasksJsonImporter.kt b/app/src/main/java/org/tasks/backup/TasksJsonImporter.kt index 18713a307..bb0fc4170 100644 --- a/app/src/main/java/org/tasks/backup/TasksJsonImporter.kt +++ b/app/src/main/java/org/tasks/backup/TasksJsonImporter.kt @@ -195,7 +195,6 @@ class TasksJsonImporter @Inject constructor( val geofence = Geofence() geofence.task = taskId geofence.place = place.uid - geofence.radius = location.radius geofence.isArrival = location.arrival geofence.isDeparture = location.departure locationDao.insert(geofence) diff --git a/app/src/main/java/org/tasks/data/Geofence.kt b/app/src/main/java/org/tasks/data/Geofence.kt index 953497bdd..a1d9a2ef7 100644 --- a/app/src/main/java/org/tasks/data/Geofence.kt +++ b/app/src/main/java/org/tasks/data/Geofence.kt @@ -22,9 +22,6 @@ class Geofence : Serializable, Parcelable { @ColumnInfo(name = "place") var place: String? = null - @ColumnInfo(name = "radius") - var radius = 0 - @ColumnInfo(name = "arrival") var isArrival = false @@ -34,7 +31,7 @@ class Geofence : Serializable, Parcelable { constructor() @Ignore - constructor(task: Long, place: String?, arrival: Boolean, departure: Boolean, radius: Int) : this(place, arrival, departure, radius) { + constructor(task: Long, place: String?, arrival: Boolean, departure: Boolean) : this(place, arrival, departure) { this.task = task } @@ -44,15 +41,13 @@ class Geofence : Serializable, Parcelable { val defaultReminders = preferences.getIntegerFromString(R.string.p_default_location_reminder_key, 1) isArrival = defaultReminders == 1 || defaultReminders == 3 isDeparture = defaultReminders == 2 || defaultReminders == 3 - radius = preferences.getInt(R.string.p_default_location_radius, 250) } @Ignore - constructor(place: String?, arrival: Boolean, departure: Boolean, radius: Int) { + constructor(place: String?, arrival: Boolean, departure: Boolean) { this.place = place isArrival = arrival isDeparture = departure - this.radius = radius } @Ignore @@ -60,7 +55,6 @@ class Geofence : Serializable, Parcelable { id = o.id task = o.task place = o.place - radius = o.radius isArrival = o.isArrival isDeparture = o.isDeparture } @@ -70,7 +64,6 @@ class Geofence : Serializable, Parcelable { id = parcel.readLong() task = parcel.readLong() place = parcel.readString() - radius = parcel.readInt() isArrival = parcel.readInt() == 1 isDeparture = parcel.readInt() == 1 } @@ -82,7 +75,6 @@ class Geofence : Serializable, Parcelable { writeLong(id) writeLong(task) writeString(place) - writeInt(radius) writeInt(if (isArrival) 1 else 0) writeInt(if (isDeparture) 1 else 0) } @@ -95,7 +87,6 @@ class Geofence : Serializable, Parcelable { if (id != other.id) return false if (task != other.task) return false if (place != other.place) return false - if (radius != other.radius) return false if (isArrival != other.isArrival) return false if (isDeparture != other.isDeparture) return false @@ -106,14 +97,13 @@ class Geofence : Serializable, Parcelable { var result = id.hashCode() result = 31 * result + task.hashCode() result = 31 * result + (place?.hashCode() ?: 0) - result = 31 * result + radius result = 31 * result + isArrival.hashCode() result = 31 * result + isDeparture.hashCode() return result } override fun toString(): String = - "Geofence(id=$id, task=$task, place=$place, radius=$radius, isArrival=$isArrival, isDeparture=$isDeparture)" + "Geofence(id=$id, task=$task, place=$place, isArrival=$isArrival, isDeparture=$isDeparture)" companion object { const val TABLE_NAME = "geofences" diff --git a/app/src/main/java/org/tasks/data/Location.kt b/app/src/main/java/org/tasks/data/Location.kt index e957768c7..6dc9f5d05 100644 --- a/app/src/main/java/org/tasks/data/Location.kt +++ b/app/src/main/java/org/tasks/data/Location.kt @@ -35,7 +35,7 @@ class Location : Serializable, Parcelable { get() = place.longitude val radius: Int - get() = geofence.radius + get() = place.radius val phone: String? get() = place.phone diff --git a/app/src/main/java/org/tasks/data/LocationDao.kt b/app/src/main/java/org/tasks/data/LocationDao.kt index d97b46f7a..e17a627b5 100644 --- a/app/src/main/java/org/tasks/data/LocationDao.kt +++ b/app/src/main/java/org/tasks/data/LocationDao.kt @@ -28,8 +28,7 @@ interface LocationDao { @Query("SELECT places.*," + " max(geofences.arrival) as arrival," - + " max(geofences.departure) as departure," - + " min(geofences.radius) as radius" + + " max(geofences.departure) as departure" + " FROM places" + " INNER JOIN geofences ON geofences.place = places.uid" + " INNER JOIN tasks ON tasks._id = geofences.task" diff --git a/app/src/main/java/org/tasks/data/MergedGeofence.kt b/app/src/main/java/org/tasks/data/MergedGeofence.kt index e6de8d628..c369ffc74 100644 --- a/app/src/main/java/org/tasks/data/MergedGeofence.kt +++ b/app/src/main/java/org/tasks/data/MergedGeofence.kt @@ -6,7 +6,6 @@ class MergedGeofence { @Embedded lateinit var place: Place var arrival = false var departure = false - var radius = 0 val uid: String? get() = place.uid @@ -17,6 +16,9 @@ class MergedGeofence { val longitude: Double get() = place.longitude + val radius: Int + get() = place.radius + override fun toString(): String = - "MergedGeofence(place=$place, arrival=$arrival, departure=$departure, radius=$radius)" + "MergedGeofence(place=$place, arrival=$arrival, departure=$departure)" } \ No newline at end of file diff --git a/app/src/main/java/org/tasks/data/Place.kt b/app/src/main/java/org/tasks/data/Place.kt index 1f529c1a3..07ca575c5 100644 --- a/app/src/main/java/org/tasks/data/Place.kt +++ b/app/src/main/java/org/tasks/data/Place.kt @@ -5,7 +5,11 @@ import android.location.Location import android.net.Uri import android.os.Parcel import android.os.Parcelable -import androidx.room.* +import androidx.room.ColumnInfo +import androidx.room.Entity +import androidx.room.Ignore +import androidx.room.Index +import androidx.room.PrimaryKey import com.todoroo.andlib.data.Table import com.todoroo.astrid.api.FilterListItem.NO_ORDER import com.todoroo.astrid.helper.UUIDHelper @@ -55,6 +59,9 @@ class Place : Serializable, Parcelable { @ColumnInfo(name = "place_order") var order = NO_ORDER + @ColumnInfo(name = "radius", defaultValue = "250") + var radius = 250 + constructor() @Ignore @@ -70,6 +77,7 @@ class Place : Serializable, Parcelable { color = o.color icon = o.icon order = o.order + radius = o.radius } @Ignore @@ -85,6 +93,7 @@ class Place : Serializable, Parcelable { color = parcel.readInt() icon = parcel.readInt() order = parcel.readInt() + radius = parcel.readInt() } fun getIcon(): Int = if (icon == -1) PLACE else icon @@ -129,12 +138,15 @@ class Place : Serializable, Parcelable { writeInt(color) writeInt(icon) writeInt(order) + writeInt(radius) } } override fun equals(other: Any?): Boolean { if (this === other) return true - if (other !is Place) return false + if (javaClass != other?.javaClass) return false + + other as Place if (id != other.id) return false if (uid != other.uid) return false @@ -147,6 +159,7 @@ class Place : Serializable, Parcelable { if (color != other.color) return false if (icon != other.icon) return false if (order != other.order) return false + if (radius != other.radius) return false return true } @@ -163,11 +176,13 @@ class Place : Serializable, Parcelable { result = 31 * result + color result = 31 * result + icon result = 31 * result + order + result = 31 * result + radius return result } - override fun toString(): String = - "Place(id=$id, uid=$uid, name=$name, address=$address, phone=$phone, url=$url, latitude=$latitude, longitude=$longitude, color=$color, icon=$icon, order=$order)" + override fun toString(): String { + return "Place(id=$id, uid=$uid, name=$name, address=$address, phone=$phone, url=$url, latitude=$latitude, longitude=$longitude, color=$color, icon=$icon, order=$order, radius=$radius)" + } companion object { const val KEY = "place" diff --git a/app/src/main/java/org/tasks/db/Migrations.kt b/app/src/main/java/org/tasks/db/Migrations.kt index b0b20e795..bfae800c3 100644 --- a/app/src/main/java/org/tasks/db/Migrations.kt +++ b/app/src/main/java/org/tasks/db/Migrations.kt @@ -1,6 +1,8 @@ package org.tasks.db import android.database.sqlite.SQLiteException +import androidx.room.DeleteColumn +import androidx.room.migration.AutoMigrationSpec import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import com.todoroo.astrid.api.FilterListItem.NO_ORDER @@ -21,6 +23,12 @@ import java.io.File import java.util.concurrent.TimeUnit.HOURS object Migrations { + + @DeleteColumn.Entries( + DeleteColumn(tableName = "geofences", columnName = "radius"), + ) + class AutoMigrate82to83: AutoMigrationSpec + private val MIGRATION_35_36: Migration = object : Migration(35, 36) { override fun migrate(database: SupportSQLiteDatabase) { database.execSQL("ALTER TABLE `tagdata` ADD COLUMN `color` INTEGER DEFAULT -1") diff --git a/app/src/main/java/org/tasks/dialogs/GeofenceDialog.java b/app/src/main/java/org/tasks/dialogs/GeofenceDialog.java index 32a14b687..58b866108 100644 --- a/app/src/main/java/org/tasks/dialogs/GeofenceDialog.java +++ b/app/src/main/java/org/tasks/dialogs/GeofenceDialog.java @@ -14,14 +14,12 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; -import com.google.android.material.slider.Slider; import com.google.android.material.switchmaterial.SwitchMaterial; import org.tasks.R; import org.tasks.data.Geofence; import org.tasks.data.Location; import org.tasks.databinding.LocationDetailsBinding; -import org.tasks.locale.Locale; import org.tasks.preferences.PermissionChecker; import javax.inject.Inject; @@ -33,18 +31,13 @@ public class GeofenceDialog extends DialogFragment { public static final String EXTRA_GEOFENCE = "extra_geofence"; private static final String EXTRA_ORIGINAL = "extra_original"; - private static final int MIN_RADIUS = 75; - private static final int MAX_RADIUS = 1000; - private static final int STEP = 25; @Inject DialogBuilder dialogBuilder; @Inject Activity context; - @Inject Locale locale; @Inject PermissionChecker permissionChecker; private SwitchMaterial arrivalView; private SwitchMaterial departureView; - private Slider slider; public static GeofenceDialog newGeofenceDialog(Location location) { GeofenceDialog dialog = new GeofenceDialog(); @@ -67,16 +60,8 @@ public class GeofenceDialog extends DialogFragment { LocationDetailsBinding binding = LocationDetailsBinding.inflate(layoutInflater); arrivalView = binding.locationArrival; departureView = binding.locationDeparture; - slider = binding.slider; arrivalView.setChecked(geofence.isArrival()); departureView.setChecked(geofence.isDeparture()); - slider.setLabelFormatter( - value -> getString(R.string.location_radius_meters, locale.formatNumber(value))); - slider.setValueTo(MAX_RADIUS); - slider.setValueFrom(MIN_RADIUS); - slider.setStepSize(STEP); - slider.setHaloRadius(0); - slider.setValue(Math.round((geofence.getRadius() / STEP) * STEP)); return dialogBuilder .newDialog(original.getDisplayName()) .setView(binding.getRoot()) @@ -95,7 +80,6 @@ public class GeofenceDialog extends DialogFragment { Geofence geofence = new Geofence(); geofence.setArrival(arrivalView.isChecked()); geofence.setDeparture(departureView.isChecked()); - geofence.setRadius((int) slider.getValue()); return geofence; } diff --git a/app/src/main/java/org/tasks/ui/LocationControlSet.kt b/app/src/main/java/org/tasks/ui/LocationControlSet.kt index 19f8db0eb..10637ebee 100644 --- a/app/src/main/java/org/tasks/ui/LocationControlSet.kt +++ b/app/src/main/java/org/tasks/ui/LocationControlSet.kt @@ -28,7 +28,6 @@ import org.tasks.preferences.Device import org.tasks.preferences.FragmentPermissionRequestor import org.tasks.preferences.PermissionChecker import org.tasks.preferences.Preferences -import java.util.* import javax.inject.Inject @AndroidEntryPoint @@ -175,8 +174,8 @@ class LocationControlSet : TaskEditControlFragment() { Geofence( place.uid, existing.isArrival, - existing.isDeparture, - existing.radius) + existing.isDeparture + ) } setLocation(Location(geofence, place)) } diff --git a/app/src/main/res/layout/activity_location_settings.xml b/app/src/main/res/layout/activity_location_settings.xml index c850d331e..60756bf74 100644 --- a/app/src/main/res/layout/activity_location_settings.xml +++ b/app/src/main/res/layout/activity_location_settings.xml @@ -1,11 +1,12 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/root_layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:descendantFocusability="beforeDescendants" + android:focusableInTouchMode="true" + android:orientation="vertical"> @@ -34,6 +35,27 @@ + + + + + android:layout_height="wrap_content"> - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index e55919822..43445c01f 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -318,7 +318,6 @@ اسم العلامة يحتوي… علامة… الموقع الافتراضي - نصف القطر الافتراضي الأولويّة الافتراضيّة أنشأ تصفيةً جديدة بتاريخ الإنشاء diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml index e04b3b359..cc98d48d4 100644 --- a/app/src/main/res/values-bg-rBG/strings.xml +++ b/app/src/main/res/values-bg-rBG/strings.xml @@ -92,7 +92,6 @@ Приоритет по подразбиране Напомняния по подразбиране Напомняния за място по подразбиране - Радиус по подразбиране Тон на звънене/вибрация по подразбиране Висок Среден diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index c197ca8a5..8e4ae6f84 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -164,7 +164,6 @@ So / vibració predeterminat Mig En arribar - Radi predeterminat Baix Sense recordatoris A la sortida diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 49da4bae2..44bb6a94f 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -213,7 +213,6 @@ Vlastní pořadí Přidat podúkol Výchozí upomínky podle polohy - Výchozí přesnost Při příchodu Při odchodu Při příchodu a odchodu diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 8dd9c9f43..e186060d7 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -512,7 +512,6 @@ Middel Høj Ring/vibrér som standard - Standardradius Standard for placeringspåmindelser Standardindstillinger for opgaver Er du sikker på, at du vil slette alle dine begivenheder for opgaver\? diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c3e3e35e6..4559c57cf 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -89,7 +89,6 @@ Dringlichkeitsvorgabe Standard-Erinnerungen Standard-Standort-Erinnerungen - Standardbereich Alarm/Vibrationssignal Hoch Mittel diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index f3f3cf446..a60ef1d20 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -348,7 +348,6 @@ Eraro dum aldonado de tasko al kalendaro! Defaŭlta loko Defaŭlta vokosono/vibrado - Defaŭlta radiuso Defaŭlta prioritato Ĉu vi certe volas forigi viajn ĉiujn eventojn por taskoj\? Forigi ĉiujn kalendarajn eventojn por taskoj diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e14895ce7..3cb925da1 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -89,7 +89,6 @@ Prioridad predeterminada Recordatorios por defecto Recordatorios de ubicación predeterminados - Radio predeterminado Tipo predeterminado de timbre/vibración Alta Media diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 1581b48bb..15aeb5d30 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -66,7 +66,6 @@ Vaikimisi tähtsus Vaikimisi meeldetuletused Vaikimisi asukoha-põhised meeldetuletused - Vaikimisi raadius Kõrge Keskmine Madal diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index b8db674cf..91cda398f 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -90,7 +90,6 @@ Lehenetsitako lehentasuna Lehenetsitako oroigarriak Lehenetsitako kokaleku-oroigarriak - Lehenetsitako erradioa Lehenetsitako doinua/bibrazio mota Altua Ertaina diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 3f6e4e214..1096ae5da 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -461,7 +461,6 @@ Lähdettäessä Saavuttaessa Ei muistutuksia - Oletusetäisyys Oletussijaintimuistutukset Sijainti Lisää alitehtävä diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 78c0b23b4..4670e035c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -83,7 +83,6 @@ Priorité par défaut Rappels par défaut Rappels d\'emplacement par défaut - Rayon par défaut Type de sonnerie/vibration par défaut Haute Moyenne diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 48fcd1191..df3d7ccdd 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -530,7 +530,6 @@ Visoki Standardna lokacija Standardna vrsta zvona/vibracije - Standardni radijus Standardni podsjetnici lokacija Standardni podsjetnici Standardni datum roka diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index d35eb17ff..b1f5499e7 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -88,7 +88,6 @@ Alapértelmezett prioritás Alapértelmezett emlékeztetők Alapértelmezett hely emlékeztetők - Alapértelmezett távolság Alapértelmezett csengetés/rezgés típusa Magas Közepes diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 88933fda9..8ffd8a7bc 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -625,7 +625,6 @@ Saat keberangkatan Pada kedatangan Tipe dering/getar bawaan - Radius bawaan Tanggal jatuh tempo bawaan Tanggal mulai bawaan Tampilkan tanggal penuh diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 7bb1db9ef..0e7bee0f6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -90,7 +90,6 @@ Priorità predefinita Promemoria predefiniti Posizione promemoria predefinita - Raggio predefinito Tipo di squillo/vibrazione predefinito Alta Media diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index c57aa2de2..08e60be81 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -90,7 +90,6 @@ עדיפות מחדל תזכורות ברירת מחדל תזכורות מיקום ברירת מחדל - רדיוס ברירת מחדל ברירת מחדל לסוג צלצול/רטט גבוה בינוני diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 725d93f8a..03149e419 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -87,7 +87,6 @@ デフォルトの優先順位 デフォルトのリマインダー デフォルトの場所リマインダー - デフォルトの半径 デフォルトの通知音、振動種類 diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 5f621c8e9..da9bc6d50 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -88,7 +88,6 @@ 기본 우선순위 기본 알림 기본 위치 알림 - 기본 반경 기본 벨소리/진동 형식 높음 중간 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 40d1d2b5e..90e12ac03 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -92,7 +92,6 @@ Numatytasis prioritetas Numatytieji priminimai Numatytieji vietų priminimai - Numatytasis spindulys Numatytasis skambučio/vibracijos tipas Aukštas Vidutinis diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 64dfd2675..7ffe4489f 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -197,7 +197,6 @@ Ønsker du virkelig å slette alle dine hendelser for gjøremål\? Gjøremålsforvalg Forvalgte stedspåminnelser - Forvalgt radius Forvalgt ringe/vibrasjonstype Høy Middels diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index d58b70db8..b6fef0052 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -89,7 +89,6 @@ Prioriteit Herinneringen Locatie herinneringen - Locatie actieradius Beltoon/trillen Hoog Gemiddeld diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 54be2b671..f2fa626ec 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -85,7 +85,6 @@ Domyślny priorytet Przypomnienia (domyślnie) Domyślne powiadomienia o lokalizacji - Domyślny promień Domyślny dzwonek/wibracja Ważne Średnio ważne diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index c2908272a..06d31b52c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -86,7 +86,6 @@ Prioridade padrão Lembretes padrões Lembretes de localização padrão - Raio padrão Tipo de toque/vibração padrão Alta Média diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index b0645240d..f3302169f 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -427,7 +427,6 @@ Ao sair Ao chegar Sem lembretes - Alcance predefinido Lembretes de localização predefinidos Localização Amanhã à noite diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 457ed2136..468f119a9 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -443,7 +443,6 @@ Mare Locație implicită Tipul implicit de alarmă/vibrație - Raza implicită Reamintiri de locație implicită Reamintiri implicite data scadentă implicită diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 105113592..e25ac1c97 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -90,7 +90,6 @@ Приоритет по умолчанию Напоминания по умолчанию Напоминания о месте по умолчанию - Радиус по умолчанию Тип звонка/вибрации по умолчанию Высокий Средний diff --git a/app/src/main/res/values-si/strings.xml b/app/src/main/res/values-si/strings.xml index 70a45350d..181bec271 100644 --- a/app/src/main/res/values-si/strings.xml +++ b/app/src/main/res/values-si/strings.xml @@ -63,7 +63,6 @@ පැමිණිවිට සහ පිටත්වනවිට පිටත්ව යන විට පැමිණි විට - පෙරනිමි අරය නියමිත වේලාවට දින දර්ශන සිදුවීම් ආරම්භ කරන්න ටයිමර් පාලනය අමතන්න diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 058cea7cd..4d5375c98 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -87,7 +87,6 @@ Predvolená dôležitosť Predvolené pripomienky Východzie upozornenia podľa polohy - Predvolený polomer Východzie vyzváňanie/vybrovanie Vysoká Stredná diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 29f1f61ba..cd1ba0ba9 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -241,7 +241,6 @@ Öppna Plats Standardplatspåminnelse - Standardavstånd Inga påminnelser Vid ankomst Vid avgång diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 68eb77c42..950a363aa 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -6,7 +6,6 @@ குறைந்த நடுத்தரமான உயரமான - இயல்புநிலை ஆரம் இயல்புநிலை இருப்பிட நினைவூட்டல்கள் இயல்புநிலை நினைவூட்டல்கள் இயல்புநிலை முன்னுரிமை diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 4b1d0ef9e..44a20b3d7 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -545,7 +545,6 @@ ต่ํา ปานกลาง สูง - รัศมีเริ่มต้น ตัวเตือนเริ่มต้น วันที่เริ่มต้นเริ่มต้น ไม่รวมอยู่ในการสมัครสมาชิก \'ตั้งชื่อราคาของคุณ\' diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 8afe96307..61ce800d7 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -90,7 +90,6 @@ Öntanımlı öncelik Öntanımlı anımsatıcılar Öntanımlı konum anımsatıcılar - Öntanımlı yarıçap Öntanımlı zil/titreşim türü Yüksek Orta diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index af83b5774..65780eaca 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -90,7 +90,6 @@ Типовий пріоритет Типові нагадування Типові нагадування про розташування - Типовий радіус Типовий звук/вібраця Високий Середній diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 3953daba7..b25671209 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -75,7 +75,6 @@ ہائی ڈیفالٹ لوکیشن ڈیفالٹ رنگ ٹون / وائبریشن ٹائپ - ڈیفالٹ رداس ڈیفالٹ لوکیشن کی یاد دہانیاں ڈیفالٹ یاددہانی ڈیفالٹ ترجیح diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 72a41da57..930317eed 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -641,7 +641,6 @@ Cao Vị trí mặc định Loại đổ chuông/rung mặc định - Bán kính mặc định Lời nhắc vị trí mặc định Lời nhắc mặc định Ngày hạn mặc định diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 73a427089..f4ceafdc7 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -388,7 +388,6 @@ 增加链接至网站,地址,电话号码 位置 默认位置提醒 - 默认半径 无提醒 抵达时 出发时 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 645c1d6d7..847aa6c0b 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -301,7 +301,6 @@ 到達時 沒有提醒 默認位置 - 默認半徑 默認位置提醒 顯示完整日期 Tasks.org 帳號 diff --git a/app/src/main/res/values/keys.xml b/app/src/main/res/values/keys.xml index 1c39e735f..83559a893 100644 --- a/app/src/main/res/values/keys.xml +++ b/app/src/main/res/values/keys.xml @@ -216,7 +216,6 @@ p_def_reminders_v2 p_def_location_reminders - p_def_location_radius rmd_default_reminder_mode diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0f7d80ff6..295a6c735 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -104,7 +104,6 @@ File %1$s contained %2$s.\n\n Default due date Default reminders Default location reminders - Default radius Default ring/vibrate type Default location High diff --git a/app/src/main/res/xml/preferences_task_defaults.xml b/app/src/main/res/xml/preferences_task_defaults.xml index a78adf832..074487371 100644 --- a/app/src/main/res/xml/preferences_task_defaults.xml +++ b/app/src/main/res/xml/preferences_task_defaults.xml @@ -110,13 +110,4 @@ android:title="@string/EPr_default_location_reminder_title" app:singleLineTitle="false" /> - -