From 2dbe699511cf4590f2315a9ec90237477ab85a38 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Sun, 24 Mar 2024 11:35:22 +0100 Subject: [PATCH 001/104] Added setting default tab (#5) --- .../fossify/clock/activities/MainActivity.kt | 20 +++++++--- .../clock/activities/SettingsActivity.kt | 40 ++++++++++++++++--- .../clock/adapters/ViewPagerAdapter.kt | 20 +++++----- .../org/fossify/clock/helpers/Constants.kt | 12 ++++-- app/src/main/res/layout/activity_settings.xml | 23 +++++++++++ 5 files changed, 90 insertions(+), 25 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt index 6f33aa8d..13041ea6 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt @@ -141,7 +141,7 @@ class MainActivity : SimpleActivity() { private fun refreshMenuItems() { binding.mainToolbar.menu.apply { - findItem(R.id.sort).isVisible = binding.viewPager.currentItem == TAB_ALARM + findItem(R.id.sort).isVisible = binding.viewPager.currentItem == getTabIndex(TAB_ALARM) findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(org.fossify.commons.R.bool.hide_google_relations) } } @@ -149,7 +149,7 @@ class MainActivity : SimpleActivity() { override fun onNewIntent(intent: Intent) { if (intent.extras?.containsKey(OPEN_TAB) == true) { val tabToOpen = intent.getIntExtra(OPEN_TAB, TAB_CLOCK) - binding.viewPager.setCurrentItem(tabToOpen, false) + binding.viewPager.setCurrentItem(getTabIndex(tabToOpen), false) if (tabToOpen == TAB_TIMER) { val timerId = intent.getIntExtra(TIMER_ID, INVALID_TIMER_ID) (binding.viewPager.adapter as ViewPagerAdapter).updateTimerPosition(timerId) @@ -179,7 +179,7 @@ class MainActivity : SimpleActivity() { private fun storeNewAlarmSound(resultData: Intent) { val newAlarmSound = storeNewYourAlarmSound(resultData) - when (binding.viewPager.currentItem) { + when (getTabIndex(binding.viewPager.currentItem)) { TAB_ALARM -> getViewPagerAdapter()?.updateAlarmTabAlarmSound(newAlarmSound) TAB_TIMER -> getViewPagerAdapter()?.updateTimerTabAlarmSound(newAlarmSound) } @@ -199,7 +199,7 @@ class MainActivity : SimpleActivity() { refreshMenuItems() } - val tabToOpen = intent.getIntExtra(OPEN_TAB, config.lastUsedViewPagerPage) + val tabToOpen = intent.getIntExtra(OPEN_TAB, config.defaultTab) intent.removeExtra(OPEN_TAB) if (tabToOpen == TAB_TIMER) { val timerId = intent.getIntExtra(TIMER_ID, INVALID_TIMER_ID) @@ -211,7 +211,7 @@ class MainActivity : SimpleActivity() { } binding.viewPager.offscreenPageLimit = TABS_COUNT - 1 - binding.viewPager.currentItem = tabToOpen + binding.viewPager.currentItem = getTabIndex(tabToOpen) } private fun setupTabs() { @@ -298,4 +298,14 @@ class MainActivity : SimpleActivity() { startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true) } + + private fun getTabIndex(tabId: Int): Int { + return when (tabId) { + TAB_CLOCK -> TAB_CLOCK_INDEX + TAB_ALARM -> TAB_ALARM_INDEX + TAB_STOPWATCH -> TAB_STOPWATCH_INDEX + TAB_TIMER -> TAB_TIMER_INDEX + else -> config.lastUsedViewPagerPage + } + } } diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 79413d6b..3c4664a5 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -2,15 +2,14 @@ package org.fossify.clock.activities import android.content.Intent import android.os.Bundle +import org.fossify.clock.R import org.fossify.clock.databinding.ActivitySettingsBinding import org.fossify.clock.extensions.config -import org.fossify.clock.helpers.DEFAULT_MAX_ALARM_REMINDER_SECS -import org.fossify.clock.helpers.DEFAULT_MAX_TIMER_REMINDER_SECS +import org.fossify.clock.helpers.* +import org.fossify.commons.dialogs.RadioGroupDialog import org.fossify.commons.extensions.* -import org.fossify.commons.helpers.IS_CUSTOMIZING_COLORS -import org.fossify.commons.helpers.MINUTE_SECONDS -import org.fossify.commons.helpers.NavigationIcon -import org.fossify.commons.helpers.isTiramisuPlus +import org.fossify.commons.helpers.* +import org.fossify.commons.models.RadioItem import java.util.Locale import kotlin.system.exitProcess @@ -34,6 +33,7 @@ class SettingsActivity : SimpleActivity() { setupCustomizeColors() setupUseEnglish() setupLanguage() + setupDefaultTab() setupPreventPhoneFromSleeping() setupSundayFirst() setupAlarmMaxReminder() @@ -86,6 +86,34 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupDefaultTab() { + binding.settingsDefaultTab.text = getDefaultTabText() + binding.settingsDefaultTabHolder.setOnClickListener { + val items = arrayListOf( + RadioItem(TAB_CLOCK, getString(R.string.clock)), + RadioItem(TAB_ALARM, getString(org.fossify.commons.R.string.alarm)), + RadioItem(TAB_STOPWATCH, getString(R.string.stopwatch)), + RadioItem(TAB_TIMER, getString(R.string.timer)), + RadioItem(TAB_LAST_USED, getString(org.fossify.commons.R.string.last_used_tab)) + ) + + RadioGroupDialog(this@SettingsActivity, items, config.defaultTab) { + config.defaultTab = it as Int + binding.settingsDefaultTab.text = getDefaultTabText() + } + } + } + + private fun getDefaultTabText() = getString( + when (config.defaultTab) { + TAB_CLOCK -> R.string.clock + TAB_ALARM -> org.fossify.commons.R.string.alarm + TAB_STOPWATCH -> R.string.stopwatch + TAB_TIMER -> R.string.timer + else -> org.fossify.commons.R.string.last_used_tab + } + ) + private fun setupPreventPhoneFromSleeping() { binding.settingsPreventPhoneFromSleeping.isChecked = config.preventPhoneFromSleeping binding.settingsPreventPhoneFromSleepingHolder.setOnClickListener { diff --git a/app/src/main/kotlin/org/fossify/clock/adapters/ViewPagerAdapter.kt b/app/src/main/kotlin/org/fossify/clock/adapters/ViewPagerAdapter.kt index 17c8a0f8..d5cb5fba 100644 --- a/app/src/main/kotlin/org/fossify/clock/adapters/ViewPagerAdapter.kt +++ b/app/src/main/kotlin/org/fossify/clock/adapters/ViewPagerAdapter.kt @@ -34,34 +34,34 @@ class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) { override fun getCount() = TABS_COUNT private fun getFragment(position: Int) = when (position) { - 0 -> ClockFragment() - 1 -> AlarmFragment() - 2 -> StopwatchFragment() - 3 -> TimerFragment() + TAB_CLOCK_INDEX -> ClockFragment() + TAB_ALARM_INDEX -> AlarmFragment() + TAB_STOPWATCH_INDEX -> StopwatchFragment() + TAB_TIMER_INDEX -> TimerFragment() else -> throw RuntimeException("Trying to fetch unknown fragment id $position") } fun showAlarmSortDialog() { - (fragments[TAB_ALARM] as? AlarmFragment)?.showSortingDialog() + (fragments[TAB_ALARM_INDEX] as? AlarmFragment)?.showSortingDialog() } fun updateClockTabAlarm() { - (fragments[TAB_CLOCK] as? ClockFragment)?.updateAlarm() + (fragments[TAB_CLOCK_INDEX] as? ClockFragment)?.updateAlarm() } fun updateAlarmTabAlarmSound(alarmSound: AlarmSound) { - (fragments[TAB_ALARM] as? AlarmFragment)?.updateAlarmSound(alarmSound) + (fragments[TAB_ALARM_INDEX] as? AlarmFragment)?.updateAlarmSound(alarmSound) } fun updateTimerTabAlarmSound(alarmSound: AlarmSound) { - (fragments[TAB_TIMER] as? TimerFragment)?.updateAlarmSound(alarmSound) + (fragments[TAB_TIMER_INDEX] as? TimerFragment)?.updateAlarmSound(alarmSound) } fun updateTimerPosition(timerId: Int) { - (fragments[TAB_TIMER] as? TimerFragment)?.updatePosition(timerId) + (fragments[TAB_TIMER_INDEX] as? TimerFragment)?.updatePosition(timerId) } fun startStopWatch() { - (fragments[TAB_STOPWATCH] as? StopwatchFragment)?.startStopWatch() + (fragments[TAB_STOPWATCH_INDEX] as? StopwatchFragment)?.startStopWatch() } } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 99fd99c4..fdb21b94 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -50,10 +50,14 @@ const val EARLY_ALARM_DISMISSAL_INTENT_ID = 10002 const val EARLY_ALARM_NOTIF_ID = 10003 const val OPEN_TAB = "open_tab" -const val TAB_CLOCK = 0 -const val TAB_ALARM = 1 -const val TAB_STOPWATCH = 2 -const val TAB_TIMER = 3 +const val TAB_CLOCK = 1 +const val TAB_ALARM = 2 +const val TAB_STOPWATCH = 4 +const val TAB_TIMER = 8 +const val TAB_CLOCK_INDEX = 0 +const val TAB_ALARM_INDEX = 1 +const val TAB_STOPWATCH_INDEX = 2 +const val TAB_TIMER_INDEX = 3 const val TIMER_ID = "timer_id" const val INVALID_TIMER_ID = -1 diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 159fb86b..fc662aae 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -133,6 +133,29 @@ + + + + + + + + Date: Tue, 2 Apr 2024 11:30:15 +0300 Subject: [PATCH 002/104] FEAT: added alram export and import functionality --- .../fossify/clock/activities/MainActivity.kt | 148 +++++++++++++++++- .../clock/dialogs/ExportAlarmsDialog.kt | 72 +++++++++ .../fossify/clock/helpers/AlarmsExporter.kt | 43 +++++ .../fossify/clock/helpers/AlarmsImporter.kt | 74 +++++++++ .../org/fossify/clock/helpers/Config.kt | 4 + .../org/fossify/clock/helpers/Constants.kt | 2 + .../kotlin/org/fossify/clock/models/Alarm.kt | 18 ++- .../main/res/layout/dialog_export_alarms.xml | 51 ++++++ app/src/main/res/menu/menu.xml | 8 + app/src/main/res/values/strings.xml | 3 +- 10 files changed, 415 insertions(+), 8 deletions(-) create mode 100644 app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt create mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt create mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt create mode 100644 app/src/main/res/layout/dialog_export_alarms.xml diff --git a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt index 6f33aa8d..48bf8bb2 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt @@ -1,27 +1,31 @@ package org.fossify.clock.activities import android.annotation.SuppressLint +import android.content.ActivityNotFoundException import android.content.Intent import android.content.pm.ShortcutInfo import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Icon import android.graphics.drawable.LayerDrawable +import android.net.Uri import android.os.Bundle import android.view.WindowManager +import android.widget.Toast import me.grantland.widget.AutofitHelper import org.fossify.clock.BuildConfig import org.fossify.clock.R import org.fossify.clock.adapters.ViewPagerAdapter import org.fossify.clock.databinding.ActivityMainBinding -import org.fossify.clock.extensions.config -import org.fossify.clock.extensions.getEnabledAlarms -import org.fossify.clock.extensions.rescheduleEnabledAlarms -import org.fossify.clock.extensions.updateWidgets +import org.fossify.clock.extensions.* import org.fossify.clock.helpers.* import org.fossify.commons.databinding.BottomTablayoutItemBinding import org.fossify.commons.extensions.* import org.fossify.commons.helpers.* import org.fossify.commons.models.FAQItem +import org.fossify.clock.dialogs.ExportAlarmsDialog +import org.fossify.commons.dialogs.FilePickerDialog +import java.io.FileOutputStream +import java.io.OutputStream class MainActivity : SimpleActivity() { private var storedTextColor = 0 @@ -29,6 +33,11 @@ class MainActivity : SimpleActivity() { private var storedPrimaryColor = 0 private val binding: ActivityMainBinding by viewBinding(ActivityMainBinding::inflate) + private companion object { + private const val PICK_IMPORT_SOURCE_INTENT = 11 + private const val PICK_EXPORT_FILE_INTENT = 21 + } + override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true super.onCreate(savedInstanceState) @@ -133,6 +142,8 @@ class MainActivity : SimpleActivity() { R.id.more_apps_from_us -> launchMoreAppsFromUsIntent() R.id.settings -> launchSettings() R.id.about -> launchAbout() + R.id.export_alarms -> tryExportAlarms() + R.id.import_alarms -> tryImportAlarms() else -> return@setOnMenuItemClickListener false } return@setOnMenuItemClickListener true @@ -142,6 +153,8 @@ class MainActivity : SimpleActivity() { private fun refreshMenuItems() { binding.mainToolbar.menu.apply { findItem(R.id.sort).isVisible = binding.viewPager.currentItem == TAB_ALARM + findItem(R.id.export_alarms).isVisible = binding.viewPager.currentItem == TAB_ALARM + findItem(R.id.import_alarms).isVisible = binding.viewPager.currentItem == TAB_ALARM findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(org.fossify.commons.R.bool.hide_google_relations) } } @@ -171,8 +184,17 @@ class MainActivity : SimpleActivity() { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { super.onActivityResult(requestCode, resultCode, resultData) - if (requestCode == PICK_AUDIO_FILE_INTENT_ID && resultCode == RESULT_OK && resultData != null) { - storeNewAlarmSound(resultData) + when { + requestCode == PICK_AUDIO_FILE_INTENT_ID && resultCode == RESULT_OK && resultData != null -> { + storeNewAlarmSound(resultData) + } + requestCode == PICK_EXPORT_FILE_INTENT && resultCode == RESULT_OK && resultData != null && resultData.data != null -> { + val outputStream = contentResolver.openOutputStream(resultData.data!!) + exportAlarmsTo(outputStream) + } + requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == RESULT_OK && resultData != null && resultData.data != null -> { + tryImportAlarmsFromFile(resultData.data!!) + } } } @@ -298,4 +320,118 @@ class MainActivity : SimpleActivity() { startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true) } + + private fun exportAlarmsTo(outputStream: OutputStream?) { + ensureBackgroundThread { + val alarms = dbHelper.getAlarms() + if (alarms.isEmpty()) { + toast(org.fossify.commons.R.string.no_entries_for_exporting) + } else { + AlarmsExporter.exportAlarms(alarms, outputStream) { + toast( + when (it) { + ExportResult.EXPORT_OK -> org.fossify.commons.R.string.exporting_successful + else -> org.fossify.commons.R.string.exporting_failed + } + ) + } + } + } + } + + private fun tryExportAlarms() { + if (isQPlus()) { + ExportAlarmsDialog(this, config.lastAlarmsExportPath, true) { file -> + Intent(Intent.ACTION_CREATE_DOCUMENT).apply { + type = "application/json" + putExtra(Intent.EXTRA_TITLE, file.name) + addCategory(Intent.CATEGORY_OPENABLE) + + try { + startActivityForResult(this, PICK_EXPORT_FILE_INTENT) + } catch (e: ActivityNotFoundException) { + toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) + } catch (e: Exception) { + showErrorToast(e) + } + } + } + } else { + handlePermission(PERMISSION_WRITE_STORAGE) { isAllowed -> + if (isAllowed) { + ExportAlarmsDialog(this, config.lastAlarmsExportPath, false) { file -> + getFileOutputStream(file.toFileDirItem(this), true) { out -> + exportAlarmsTo(out) + } + } + } + } + } + } + + private fun tryImportAlarms() { + if (isQPlus()) { + Intent(Intent.ACTION_GET_CONTENT).apply { + addCategory(Intent.CATEGORY_OPENABLE) + type = "application/json" + + try { + startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) + } catch (e: ActivityNotFoundException) { + toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) + } catch (e: Exception) { + showErrorToast(e) + } + } + } else { + handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> + if (isAllowed) { + pickFileToImportAlarms() + } + } + } + } + + private fun pickFileToImportAlarms() { + FilePickerDialog(this) { + importAlarms(it) + } + } + + private fun tryImportAlarmsFromFile(uri: Uri) { + when (uri.scheme) { + "file" -> importAlarms(uri.path!!) + "content" -> { + val tempFile = getTempFile("alarms", "alarms.json") + if (tempFile == null) { + toast(org.fossify.commons.R.string.unknown_error_occurred) + return + } + + try { + val inputStream = contentResolver.openInputStream(uri) + val out = FileOutputStream(tempFile) + inputStream!!.copyTo(out) + importAlarms(tempFile.absolutePath) + } catch (e: Exception) { + showErrorToast(e) + } + } + + else -> toast(org.fossify.commons.R.string.invalid_file_format) + } + } + + private fun importAlarms(path: String) { + ensureBackgroundThread { + val result = AlarmsImporter(this, DBHelper.dbInstance!!).importAlarms(path) + toast( + when (result) { + AlarmsImporter.ImportResult.IMPORT_OK -> + org.fossify.commons.R.string.importing_successful + AlarmsImporter.ImportResult.IMPORT_FAIL -> org.fossify.commons.R.string.no_items_found + } + ) + } + } } diff --git a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt new file mode 100644 index 00000000..de48d2e4 --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt @@ -0,0 +1,72 @@ +package org.fossify.clock.dialogs + +import androidx.appcompat.app.AlertDialog +import org.fossify.commons.activities.BaseSimpleActivity +import org.fossify.commons.dialogs.FilePickerDialog +import org.fossify.commons.extensions.* +import org.fossify.commons.helpers.ensureBackgroundThread +import org.fossify.clock.R +import org.fossify.clock.databinding.DialogExportAlarmsBinding +import org.fossify.clock.extensions.config +import org.fossify.clock.helpers.ALARMS_EXPORT_EXTENSION +import java.io.File + +class ExportAlarmsDialog( + val activity: BaseSimpleActivity, + val path: String, + val hidePath: Boolean, + callback: (file: File) -> Unit, +) { + private var realPath = path.ifEmpty { activity.internalStoragePath } + private val config = activity.config + + init { + val view = DialogExportAlarmsBinding.inflate(activity.layoutInflater, null, false).apply { + exportAlarmsFolder.text = activity.humanizePath(realPath) + exportAlarmsFilename.setText("${activity.getString(R.string.export_alarms)}_${activity.getCurrentFormattedDateTime()}") + + if (hidePath) { + exportAlarmsFolderLabel.beGone() + exportAlarmsFolder.beGone() + } else { + exportAlarmsFolder.setOnClickListener { + FilePickerDialog(activity, realPath, false, showFAB = true) { + exportAlarmsFolder.text = activity.humanizePath(it) + realPath = it + } + } + } + } + + activity.getAlertDialogBuilder() + .setPositiveButton(org.fossify.commons.R.string.ok, null) + .setNegativeButton(org.fossify.commons.R.string.cancel, null) + .apply { + activity.setupDialogStuff(view.root, this, R.string.export_alarms) { alertDialog -> + alertDialog.showKeyboard(view.exportAlarmsFilename) + alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { + val filename = view.exportAlarmsFilename.value + when { + filename.isEmpty() -> activity.toast(org.fossify.commons.R.string.empty_name) + filename.isAValidFilename() -> { + val file = File(realPath, "$filename$ALARMS_EXPORT_EXTENSION") + if (!hidePath && file.exists()) { + activity.toast(org.fossify.commons.R.string.name_taken) + return@setOnClickListener + } + + ensureBackgroundThread { + config.lastAlarmsExportPath = file.absolutePath.getParentPath() + callback(file) + alertDialog.dismiss() + } + } + + else -> activity.toast(org.fossify.commons.R.string.invalid_name) + } + } + } + } + } +} + diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt new file mode 100644 index 00000000..28e4896e --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt @@ -0,0 +1,43 @@ +package org.fossify.clock.helpers + +import org.fossify.clock.models.Alarm +import org.fossify.commons.helpers.ExportResult +import java.io.OutputStream + +object AlarmsExporter { + fun exportAlarms( + alarms: ArrayList, + outputStream: OutputStream?, + callback: (result: ExportResult) -> Unit, + ) { + if (outputStream == null) { + callback.invoke(ExportResult.EXPORT_FAIL) + return + } + + val alarmsToExport = alarmsToJSON(alarms) + + try { + outputStream.bufferedWriter().use { out -> + out.write(alarmsToExport) + } + callback.invoke(ExportResult.EXPORT_OK) + } catch (e: Exception) { + callback.invoke(ExportResult.EXPORT_FAIL) + } + } + + private fun alarmsToJSON(alarms: List?): String { + if (alarms.isNullOrEmpty()) { + return "[]" + } + + val jsonAlarms = mutableListOf() + for (alarm in alarms) { + jsonAlarms.add(alarm.toJSON()) + } + + return "[${jsonAlarms.joinToString(",")}]" + } + +} diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt new file mode 100644 index 00000000..7c97f8fd --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt @@ -0,0 +1,74 @@ +package org.fossify.clock.helpers + +import android.app.Activity +import org.fossify.clock.models.Alarm +import org.fossify.commons.extensions.showErrorToast +import org.json.JSONArray +import org.json.JSONObject + +import java.io.File + +class AlarmsImporter( + private val activity: Activity, + private val dbHelper: DBHelper, +) { + enum class ImportResult { + IMPORT_FAIL, IMPORT_OK + } + + fun importAlarms(path: String): ImportResult { + return try { + val inputStream = File(path).inputStream() + val jsonString = inputStream.bufferedReader().use { it.readText().trimEnd() } + val jsonArray = JSONArray(jsonString) + + val insertedCount = insertAlarmsFromJSON(jsonArray) + if (insertedCount > 0) { + ImportResult.IMPORT_OK + } else { + ImportResult.IMPORT_FAIL + } + } catch (e: Exception) { + activity.showErrorToast(e) + ImportResult.IMPORT_FAIL + } + } + + private fun insertAlarmsFromJSON(jsonArray: JSONArray): Int { + var insertedCount = 0 + for (i in 0 until jsonArray.length()) { + val jsonObject = jsonArray.getJSONObject(i) + val alarm = parseAlarmFromJSON(jsonObject) + val insertedId = dbHelper.insertAlarm(alarm) + if (insertedId != -1) { + insertedCount++ + } + } + return insertedCount + } + + private fun parseAlarmFromJSON(jsonObject: JSONObject): Alarm { + val id = jsonObject.getInt("id") + val timeInMinutes = jsonObject.getInt("timeInMinutes") + val days = jsonObject.getInt("days") + val isEnabled = jsonObject.getBoolean("isEnabled") + val vibrate = jsonObject.getBoolean("vibrate") + val soundTitle = jsonObject.getString("soundTitle") + val soundUri = jsonObject.getString("soundUri") + val label = jsonObject.getString("label") + val oneShot = jsonObject.optBoolean("oneShot", false) + + return Alarm( + id, + timeInMinutes, + days, + isEnabled, + vibrate, + soundTitle, + soundUri, + label, + oneShot + ) + } +} + diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt index 2dbf8cdc..94d7a75c 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt @@ -104,4 +104,8 @@ class Config(context: Context) : BaseConfig(context) { var wasInitialWidgetSetUp: Boolean get() = prefs.getBoolean(WAS_INITIAL_WIDGET_SET_UP, false) set(wasInitialWidgetSetUp) = prefs.edit().putBoolean(WAS_INITIAL_WIDGET_SET_UP, wasInitialWidgetSetUp).apply() + + var lastAlarmsExportPath: String + get() = prefs.getString(LAST_ALARMS_EXPORT_PATH, "")!! + set(lastBlockedNumbersExportPath) = prefs.edit().putString(LAST_ALARMS_EXPORT_PATH, lastBlockedNumbersExportPath).apply() } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 99fd99c4..214926cc 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -26,6 +26,8 @@ const val INCREASE_VOLUME_GRADUALLY = "increase_volume_gradually" const val ALARMS_SORT_BY = "alarms_sort_by" const val STOPWATCH_LAPS_SORT_BY = "stopwatch_laps_sort_by" const val WAS_INITIAL_WIDGET_SET_UP = "was_initial_widget_set_up" +const val ALARMS_EXPORT_EXTENSION = ".json" +const val LAST_ALARMS_EXPORT_PATH = "last_alarms_export_path" const val TABS_COUNT = 4 const val EDITED_TIME_ZONE_SEPARATOR = ":" diff --git a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt index fc939900..17b9d523 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt @@ -1,6 +1,7 @@ package org.fossify.clock.models import androidx.annotation.Keep +import org.json.JSONObject @Keep data class Alarm( @@ -13,7 +14,22 @@ data class Alarm( var soundUri: String, var label: String, var oneShot: Boolean = false, -) +) { + @Keep + fun toJSON(): String { + val jsonObject = JSONObject() + jsonObject.put("id", id) + jsonObject.put("timeInMinutes", timeInMinutes) + jsonObject.put("days", days) + jsonObject.put("isEnabled", isEnabled) + jsonObject.put("vibrate", vibrate) + jsonObject.put("soundTitle", soundTitle) + jsonObject.put("soundUri", soundUri) + jsonObject.put("label", label) + jsonObject.put("oneShot", oneShot) + return jsonObject.toString() + } +} @Keep data class ObfuscatedAlarm( diff --git a/app/src/main/res/layout/dialog_export_alarms.xml b/app/src/main/res/layout/dialog_export_alarms.xml new file mode 100644 index 00000000..dac0d742 --- /dev/null +++ b/app/src/main/res/layout/dialog_export_alarms.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml index a3db8c50..be670e05 100644 --- a/app/src/main/res/menu/menu.xml +++ b/app/src/main/res/menu/menu.xml @@ -11,6 +11,14 @@ android:icon="@drawable/ic_settings_cog_vector" android:title="@string/settings" app:showAsAction="ifRoom" /> + + Add timer Upcoming alarm Early alarm dismissal - + Import alarms + Export alarms Timers are running Timer for %s is running From 2a381a3ee6bf3dd3a06de12c2abc055cc502628a Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Thu, 18 Apr 2024 13:05:54 +0300 Subject: [PATCH 003/104] moved to registerForActivityResult and added timers to exports --- .../fossify/clock/activities/MainActivity.kt | 137 ---------------- .../clock/activities/SettingsActivity.kt | 147 +++++++++++++++++- ...ortAlarmsDialog.kt => ExportDataDialog.kt} | 30 ++-- .../org/fossify/clock/helpers/Config.kt | 6 +- .../org/fossify/clock/helpers/Constants.kt | 4 +- .../{AlarmsExporter.kt => DataExporter.kt} | 25 ++- .../{AlarmsImporter.kt => DataImporter.kt} | 4 +- .../kotlin/org/fossify/clock/models/Timer.kt | 18 ++- app/src/main/res/layout/activity_settings.xml | 57 +++++++ ...port_alarms.xml => dialog_export_data.xml} | 10 +- app/src/main/res/menu/menu.xml | 8 - app/src/main/res/values/strings.xml | 9 +- 12 files changed, 271 insertions(+), 184 deletions(-) rename app/src/main/kotlin/org/fossify/clock/dialogs/{ExportAlarmsDialog.kt => ExportDataDialog.kt} (68%) rename app/src/main/kotlin/org/fossify/clock/helpers/{AlarmsExporter.kt => DataExporter.kt} (61%) rename app/src/main/kotlin/org/fossify/clock/helpers/{AlarmsImporter.kt => DataImporter.kt} (96%) rename app/src/main/res/layout/{dialog_export_alarms.xml => dialog_export_data.xml} (88%) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt index 48bf8bb2..cd03f294 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt @@ -1,16 +1,13 @@ package org.fossify.clock.activities import android.annotation.SuppressLint -import android.content.ActivityNotFoundException import android.content.Intent import android.content.pm.ShortcutInfo import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Icon import android.graphics.drawable.LayerDrawable -import android.net.Uri import android.os.Bundle import android.view.WindowManager -import android.widget.Toast import me.grantland.widget.AutofitHelper import org.fossify.clock.BuildConfig import org.fossify.clock.R @@ -22,10 +19,6 @@ import org.fossify.commons.databinding.BottomTablayoutItemBinding import org.fossify.commons.extensions.* import org.fossify.commons.helpers.* import org.fossify.commons.models.FAQItem -import org.fossify.clock.dialogs.ExportAlarmsDialog -import org.fossify.commons.dialogs.FilePickerDialog -import java.io.FileOutputStream -import java.io.OutputStream class MainActivity : SimpleActivity() { private var storedTextColor = 0 @@ -33,11 +26,6 @@ class MainActivity : SimpleActivity() { private var storedPrimaryColor = 0 private val binding: ActivityMainBinding by viewBinding(ActivityMainBinding::inflate) - private companion object { - private const val PICK_IMPORT_SOURCE_INTENT = 11 - private const val PICK_EXPORT_FILE_INTENT = 21 - } - override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true super.onCreate(savedInstanceState) @@ -142,8 +130,6 @@ class MainActivity : SimpleActivity() { R.id.more_apps_from_us -> launchMoreAppsFromUsIntent() R.id.settings -> launchSettings() R.id.about -> launchAbout() - R.id.export_alarms -> tryExportAlarms() - R.id.import_alarms -> tryImportAlarms() else -> return@setOnMenuItemClickListener false } return@setOnMenuItemClickListener true @@ -153,8 +139,6 @@ class MainActivity : SimpleActivity() { private fun refreshMenuItems() { binding.mainToolbar.menu.apply { findItem(R.id.sort).isVisible = binding.viewPager.currentItem == TAB_ALARM - findItem(R.id.export_alarms).isVisible = binding.viewPager.currentItem == TAB_ALARM - findItem(R.id.import_alarms).isVisible = binding.viewPager.currentItem == TAB_ALARM findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(org.fossify.commons.R.bool.hide_google_relations) } } @@ -188,13 +172,6 @@ class MainActivity : SimpleActivity() { requestCode == PICK_AUDIO_FILE_INTENT_ID && resultCode == RESULT_OK && resultData != null -> { storeNewAlarmSound(resultData) } - requestCode == PICK_EXPORT_FILE_INTENT && resultCode == RESULT_OK && resultData != null && resultData.data != null -> { - val outputStream = contentResolver.openOutputStream(resultData.data!!) - exportAlarmsTo(outputStream) - } - requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == RESULT_OK && resultData != null && resultData.data != null -> { - tryImportAlarmsFromFile(resultData.data!!) - } } } @@ -320,118 +297,4 @@ class MainActivity : SimpleActivity() { startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, true) } - - private fun exportAlarmsTo(outputStream: OutputStream?) { - ensureBackgroundThread { - val alarms = dbHelper.getAlarms() - if (alarms.isEmpty()) { - toast(org.fossify.commons.R.string.no_entries_for_exporting) - } else { - AlarmsExporter.exportAlarms(alarms, outputStream) { - toast( - when (it) { - ExportResult.EXPORT_OK -> org.fossify.commons.R.string.exporting_successful - else -> org.fossify.commons.R.string.exporting_failed - } - ) - } - } - } - } - - private fun tryExportAlarms() { - if (isQPlus()) { - ExportAlarmsDialog(this, config.lastAlarmsExportPath, true) { file -> - Intent(Intent.ACTION_CREATE_DOCUMENT).apply { - type = "application/json" - putExtra(Intent.EXTRA_TITLE, file.name) - addCategory(Intent.CATEGORY_OPENABLE) - - try { - startActivityForResult(this, PICK_EXPORT_FILE_INTENT) - } catch (e: ActivityNotFoundException) { - toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) - } catch (e: Exception) { - showErrorToast(e) - } - } - } - } else { - handlePermission(PERMISSION_WRITE_STORAGE) { isAllowed -> - if (isAllowed) { - ExportAlarmsDialog(this, config.lastAlarmsExportPath, false) { file -> - getFileOutputStream(file.toFileDirItem(this), true) { out -> - exportAlarmsTo(out) - } - } - } - } - } - } - - private fun tryImportAlarms() { - if (isQPlus()) { - Intent(Intent.ACTION_GET_CONTENT).apply { - addCategory(Intent.CATEGORY_OPENABLE) - type = "application/json" - - try { - startActivityForResult(this, PICK_IMPORT_SOURCE_INTENT) - } catch (e: ActivityNotFoundException) { - toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) - } catch (e: Exception) { - showErrorToast(e) - } - } - } else { - handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> - if (isAllowed) { - pickFileToImportAlarms() - } - } - } - } - - private fun pickFileToImportAlarms() { - FilePickerDialog(this) { - importAlarms(it) - } - } - - private fun tryImportAlarmsFromFile(uri: Uri) { - when (uri.scheme) { - "file" -> importAlarms(uri.path!!) - "content" -> { - val tempFile = getTempFile("alarms", "alarms.json") - if (tempFile == null) { - toast(org.fossify.commons.R.string.unknown_error_occurred) - return - } - - try { - val inputStream = contentResolver.openInputStream(uri) - val out = FileOutputStream(tempFile) - inputStream!!.copyTo(out) - importAlarms(tempFile.absolutePath) - } catch (e: Exception) { - showErrorToast(e) - } - } - - else -> toast(org.fossify.commons.R.string.invalid_file_format) - } - } - - private fun importAlarms(path: String) { - ensureBackgroundThread { - val result = AlarmsImporter(this, DBHelper.dbInstance!!).importAlarms(path) - toast( - when (result) { - AlarmsImporter.ImportResult.IMPORT_OK -> - org.fossify.commons.R.string.importing_successful - AlarmsImporter.ImportResult.IMPORT_FAIL -> org.fossify.commons.R.string.no_items_found - } - ) - } - } } diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 79413d6b..a95f2da3 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -1,16 +1,22 @@ package org.fossify.clock.activities +import android.content.ActivityNotFoundException import android.content.Intent import android.os.Bundle +import android.widget.Toast +import androidx.activity.result.contract.ActivityResultContracts import org.fossify.clock.databinding.ActivitySettingsBinding +import org.fossify.clock.dialogs.ExportDataDialog import org.fossify.clock.extensions.config -import org.fossify.clock.helpers.DEFAULT_MAX_ALARM_REMINDER_SECS -import org.fossify.clock.helpers.DEFAULT_MAX_TIMER_REMINDER_SECS +import org.fossify.clock.extensions.dbHelper +import org.fossify.clock.extensions.timerDb +import org.fossify.clock.extensions.timerHelper +import org.fossify.clock.helpers.* +import org.fossify.commons.R +import org.fossify.clock.R as CR import org.fossify.commons.extensions.* -import org.fossify.commons.helpers.IS_CUSTOMIZING_COLORS -import org.fossify.commons.helpers.MINUTE_SECONDS -import org.fossify.commons.helpers.NavigationIcon -import org.fossify.commons.helpers.isTiramisuPlus +import org.fossify.commons.helpers.* +import java.io.OutputStream import java.util.Locale import kotlin.system.exitProcess @@ -42,6 +48,7 @@ class SettingsActivity : SimpleActivity() { setupTimerMaxReminder() setupIncreaseVolumeGradually() setupCustomizeWidgetColors() + setupExportData() updateTextColors(binding.settingsHolder) arrayOf( @@ -170,4 +177,132 @@ class SettingsActivity : SimpleActivity() { } } } + + private fun setupExportData() { + binding.settingsExportDataHolder.setOnClickListener { + tryExportData() + } + } + + private val exportActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument("application/json")) { uri -> + try { + val outputStream = uri?.let { contentResolver.openOutputStream(it) } + if (outputStream != null) { + exportDataTo(outputStream) + } else { + toast(CR.string.exporting_aborted_by_user) + } + } catch (e: Exception) { + showErrorToast(e) + } + } + + private fun exportDataTo(outputStream: OutputStream?) { + ensureBackgroundThread { + val alarms = dbHelper.getAlarms() + val timers = timerDb.getTimers() + if (alarms.isEmpty()) { + toast(R.string.no_entries_for_exporting) + } else { + DataExporter.exportData(alarms, timers, outputStream) { + toast( + when (it) { + ExportResult.EXPORT_OK -> R.string.exporting_successful + else -> R.string.exporting_failed + } + ) + } + } + } + } + + private fun tryExportData() { + if (isQPlus()) { + ExportDataDialog(this, config.lastDataExportPath, true) { file -> + Intent(Intent.ACTION_CREATE_DOCUMENT).apply { + putExtra(Intent.EXTRA_TITLE, file.name) + addCategory(Intent.CATEGORY_OPENABLE) + + + try { + exportActivityResultLauncher.launch(file.name) + } catch (e: ActivityNotFoundException) { + toast(R.string.system_service_disabled, Toast.LENGTH_LONG) + } catch (e: Exception) { + showErrorToast(e) + } + + + } + } + } else { + handlePermission(PERMISSION_WRITE_STORAGE) { isAllowed -> + if (isAllowed) { + ExportDataDialog(this, config.lastDataExportPath, false) { file -> + getFileOutputStream(file.toFileDirItem(this), true) { out -> + exportDataTo(out) + } + } + } + } + } + } + +// private fun tryImportData() { +// if (isQPlus()) { +// Intent(Intent.ACTION_GET_CONTENT).apply { +// addCategory(Intent.CATEGORY_OPENABLE) +// type = "application/json" +// } +// } else { +// handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> +// if (isAllowed) { +// pickFileToImportData() +// } +// } +// } +// } +// +// private fun pickFileToImportData() { +// FilePickerDialog(this) { +// importData(it) +// } +// } +// +// private fun tryImportDataFromFile(uri: Uri) { +// when (uri.scheme) { +// "file" -> importData(uri.path!!) +// "content" -> { +// val tempFile = getTempFile("fossify_clock_data", "fossify_clock_data.json") +// if (tempFile == null) { +// toast(R.string.unknown_error_occurred) +// return +// } +// +// try { +// val inputStream = contentResolver.openInputStream(uri) +// val out = FileOutputStream(tempFile) +// inputStream!!.copyTo(out) +// importData(tempFile.absolutePath) +// } catch (e: Exception) { +// showErrorToast(e) +// } +// } +// +// else -> toast(R.string.invalid_file_format) +// } +// } +// +// private fun importData(path: String) { +// ensureBackgroundThread { +// val result = AlarmsImporter(this, DBHelper.dbInstance!!).importAlarms(path) +// toast( +// when (result) { +// AlarmsImporter.ImportResult.IMPORT_OK -> +// R.string.importing_successful +// AlarmsImporter.ImportResult.IMPORT_FAIL -> R.string.no_items_found +// } +// ) +// } +// } } diff --git a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt similarity index 68% rename from app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt rename to app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt index de48d2e4..6ab79fb9 100644 --- a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportAlarmsDialog.kt +++ b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt @@ -6,12 +6,12 @@ import org.fossify.commons.dialogs.FilePickerDialog import org.fossify.commons.extensions.* import org.fossify.commons.helpers.ensureBackgroundThread import org.fossify.clock.R -import org.fossify.clock.databinding.DialogExportAlarmsBinding +import org.fossify.clock.databinding.DialogExportDataBinding import org.fossify.clock.extensions.config -import org.fossify.clock.helpers.ALARMS_EXPORT_EXTENSION +import org.fossify.clock.helpers.DATA_EXPORT_EXTENSION import java.io.File -class ExportAlarmsDialog( +class ExportDataDialog( val activity: BaseSimpleActivity, val path: String, val hidePath: Boolean, @@ -21,17 +21,17 @@ class ExportAlarmsDialog( private val config = activity.config init { - val view = DialogExportAlarmsBinding.inflate(activity.layoutInflater, null, false).apply { - exportAlarmsFolder.text = activity.humanizePath(realPath) - exportAlarmsFilename.setText("${activity.getString(R.string.export_alarms)}_${activity.getCurrentFormattedDateTime()}") + val view = DialogExportDataBinding.inflate(activity.layoutInflater, null, false).apply { + exportDataFolder.text = activity.humanizePath(realPath) + exportDataFilename.setText("${activity.getString(R.string.settings_export_data)}_${activity.getCurrentFormattedDateTime()}") if (hidePath) { - exportAlarmsFolderLabel.beGone() - exportAlarmsFolder.beGone() + exportDataFolderLabel.beGone() + exportDataFolder.beGone() } else { - exportAlarmsFolder.setOnClickListener { + exportDataFolder.setOnClickListener { FilePickerDialog(activity, realPath, false, showFAB = true) { - exportAlarmsFolder.text = activity.humanizePath(it) + exportDataFolder.text = activity.humanizePath(it) realPath = it } } @@ -42,21 +42,21 @@ class ExportAlarmsDialog( .setPositiveButton(org.fossify.commons.R.string.ok, null) .setNegativeButton(org.fossify.commons.R.string.cancel, null) .apply { - activity.setupDialogStuff(view.root, this, R.string.export_alarms) { alertDialog -> - alertDialog.showKeyboard(view.exportAlarmsFilename) + activity.setupDialogStuff(view.root, this, R.string.settings_export_data) { alertDialog -> + alertDialog.showKeyboard(view.exportDataFilename) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { - val filename = view.exportAlarmsFilename.value + val filename = view.exportDataFilename.value when { filename.isEmpty() -> activity.toast(org.fossify.commons.R.string.empty_name) filename.isAValidFilename() -> { - val file = File(realPath, "$filename$ALARMS_EXPORT_EXTENSION") + val file = File(realPath, "$filename$DATA_EXPORT_EXTENSION") if (!hidePath && file.exists()) { activity.toast(org.fossify.commons.R.string.name_taken) return@setOnClickListener } ensureBackgroundThread { - config.lastAlarmsExportPath = file.absolutePath.getParentPath() + config.lastDataExportPath = file.absolutePath.getParentPath() callback(file) alertDialog.dismiss() } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt index 94d7a75c..f069d578 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Config.kt @@ -105,7 +105,7 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(WAS_INITIAL_WIDGET_SET_UP, false) set(wasInitialWidgetSetUp) = prefs.edit().putBoolean(WAS_INITIAL_WIDGET_SET_UP, wasInitialWidgetSetUp).apply() - var lastAlarmsExportPath: String - get() = prefs.getString(LAST_ALARMS_EXPORT_PATH, "")!! - set(lastBlockedNumbersExportPath) = prefs.edit().putString(LAST_ALARMS_EXPORT_PATH, lastBlockedNumbersExportPath).apply() + var lastDataExportPath: String + get() = prefs.getString(LAST_DATA_EXPORT_PATH, "")!! + set(lastDataExportPath) = prefs.edit().putString(LAST_DATA_EXPORT_PATH, lastDataExportPath).apply() } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 214926cc..9bf9748e 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -26,8 +26,8 @@ const val INCREASE_VOLUME_GRADUALLY = "increase_volume_gradually" const val ALARMS_SORT_BY = "alarms_sort_by" const val STOPWATCH_LAPS_SORT_BY = "stopwatch_laps_sort_by" const val WAS_INITIAL_WIDGET_SET_UP = "was_initial_widget_set_up" -const val ALARMS_EXPORT_EXTENSION = ".json" -const val LAST_ALARMS_EXPORT_PATH = "last_alarms_export_path" +const val DATA_EXPORT_EXTENSION = ".json" +const val LAST_DATA_EXPORT_PATH = "last_alarms_export_path" const val TABS_COUNT = 4 const val EDITED_TIME_ZONE_SEPARATOR = ":" diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt similarity index 61% rename from app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt rename to app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt index 28e4896e..fdca4fdc 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsExporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt @@ -1,12 +1,15 @@ package org.fossify.clock.helpers import org.fossify.clock.models.Alarm +import org.fossify.clock.models.Timer import org.fossify.commons.helpers.ExportResult import java.io.OutputStream -object AlarmsExporter { - fun exportAlarms( +object DataExporter { + + fun exportData( alarms: ArrayList, + timers: List, outputStream: OutputStream?, callback: (result: ExportResult) -> Unit, ) { @@ -16,10 +19,13 @@ object AlarmsExporter { } val alarmsToExport = alarmsToJSON(alarms) + val timersToExport = timersToJSON(timers) + + val dataToExport = "{\"alarms\": $alarmsToExport, \"timers\": $timersToExport" try { outputStream.bufferedWriter().use { out -> - out.write(alarmsToExport) + out.write(dataToExport) } callback.invoke(ExportResult.EXPORT_OK) } catch (e: Exception) { @@ -27,6 +33,7 @@ object AlarmsExporter { } } + // Replace with a generic later private fun alarmsToJSON(alarms: List?): String { if (alarms.isNullOrEmpty()) { return "[]" @@ -40,4 +47,16 @@ object AlarmsExporter { return "[${jsonAlarms.joinToString(",")}]" } + private fun timersToJSON(timers: List?): String { + if (timers.isNullOrEmpty()) { + return "[]" + } + + val jsonTimers = mutableListOf() + for (timer in timers) { + jsonTimers.add(timer.toJSON()) + } + + return "[${jsonTimers.joinToString(",")}]" + } } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt similarity index 96% rename from app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt rename to app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt index 7c97f8fd..e7262eb1 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/AlarmsImporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt @@ -8,7 +8,7 @@ import org.json.JSONObject import java.io.File -class AlarmsImporter( +class DataImporter( private val activity: Activity, private val dbHelper: DBHelper, ) { @@ -16,7 +16,7 @@ class AlarmsImporter( IMPORT_FAIL, IMPORT_OK } - fun importAlarms(path: String): ImportResult { + fun importData(path: String): ImportResult { return try { val inputStream = File(path).inputStream() val jsonString = inputStream.bufferedReader().use { it.readText().trimEnd() } diff --git a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt index f20dbe18..3f237049 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt @@ -3,6 +3,7 @@ package org.fossify.clock.models import androidx.annotation.Keep import androidx.room.Entity import androidx.room.PrimaryKey +import org.json.JSONObject @Entity(tableName = "timers") @Keep @@ -17,7 +18,22 @@ data class Timer( var createdAt: Long, var channelId: String? = null, var oneShot: Boolean = false, -) +) { + @Keep + fun toJSON(): String { + val jsonObject = JSONObject() + jsonObject.put("id", id) + jsonObject.put("state", state) + jsonObject.put("vibrate", vibrate) + jsonObject.put("soundUri", soundUri) + jsonObject.put("soundTitle", soundTitle) + jsonObject.put("label", label) + jsonObject.put("createdAt", createdAt) + jsonObject.put("channelId", channelId) + jsonObject.put("oneShot", oneShot) + return jsonObject.toString() + } +} @Keep data class ObfuscatedTimer( diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 159fb86b..dba596ab 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -283,6 +283,63 @@ tools:text="1 minute" /> + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_export_alarms.xml b/app/src/main/res/layout/dialog_export_data.xml similarity index 88% rename from app/src/main/res/layout/dialog_export_alarms.xml rename to app/src/main/res/layout/dialog_export_data.xml index dac0d742..f85c98c0 100644 --- a/app/src/main/res/layout/dialog_export_alarms.xml +++ b/app/src/main/res/layout/dialog_export_data.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent"> - - Add timer Upcoming alarm Early alarm dismissal - Import alarms - Export alarms + Timers are running Timer for %s is running @@ -51,6 +50,12 @@ Timer tab Show seconds Increase volume gradually + Export and import + Import data + Import app data (Alarms and Timers) + Export data + Export app data (Alarms and Timers) + Exporting aborted by user How can I change lap sorting at the stopwatch tab? From 34dfd03a4bb7a526d55ccdd9c438d041614018c5 Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Sun, 21 Apr 2024 10:37:01 +0300 Subject: [PATCH 004/104] Fixed data importing and made code more robust --- .../clock/activities/SettingsActivity.kt | 165 ++++++++++-------- .../org/fossify/clock/helpers/DataExporter.kt | 53 +++--- .../org/fossify/clock/helpers/DataImporter.kt | 76 ++++---- .../clock/interfaces/JSONConvertible.kt | 5 + .../kotlin/org/fossify/clock/models/Alarm.kt | 43 ++++- .../kotlin/org/fossify/clock/models/Timer.kt | 44 ++++- app/src/main/res/values/strings.xml | 6 +- 7 files changed, 249 insertions(+), 143 deletions(-) create mode 100644 app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index a95f2da3..8046e92b 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -2,6 +2,7 @@ package org.fossify.clock.activities import android.content.ActivityNotFoundException import android.content.Intent +import android.net.Uri import android.os.Bundle import android.widget.Toast import androidx.activity.result.contract.ActivityResultContracts @@ -10,15 +11,16 @@ import org.fossify.clock.dialogs.ExportDataDialog import org.fossify.clock.extensions.config import org.fossify.clock.extensions.dbHelper import org.fossify.clock.extensions.timerDb -import org.fossify.clock.extensions.timerHelper import org.fossify.clock.helpers.* import org.fossify.commons.R -import org.fossify.clock.R as CR +import org.fossify.commons.dialogs.FilePickerDialog import org.fossify.commons.extensions.* import org.fossify.commons.helpers.* +import java.io.FileOutputStream import java.io.OutputStream import java.util.Locale import kotlin.system.exitProcess +import org.fossify.clock.R as CR class SettingsActivity : SimpleActivity() { private val binding: ActivitySettingsBinding by viewBinding(ActivitySettingsBinding::inflate) @@ -49,6 +51,7 @@ class SettingsActivity : SimpleActivity() { setupIncreaseVolumeGradually() setupCustomizeWidgetColors() setupExportData() + setupImportData() updateTextColors(binding.settingsHolder) arrayOf( @@ -184,17 +187,31 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupImportData() { + binding.settingsImportDataHolder.setOnClickListener { + tryImportData() + } + } + private val exportActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument("application/json")) { uri -> - try { - val outputStream = uri?.let { contentResolver.openOutputStream(it) } - if (outputStream != null) { - exportDataTo(outputStream) - } else { - toast(CR.string.exporting_aborted_by_user) - } - } catch (e: Exception) { - showErrorToast(e) + try { + val outputStream = uri?.let { contentResolver.openOutputStream(it) } + if (outputStream != null) { + exportDataTo(outputStream) + } else { + toast(CR.string.exporting_aborted) } + } catch (e: Exception) { + showErrorToast(e) + } + } + + private val importActivityResultLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) { uri -> + if (uri != null) { + tryImportDataFromFile(uri) + } else { + toast(CR.string.importing_aborted) + } } private fun exportDataTo(outputStream: OutputStream?) { @@ -248,61 +265,73 @@ class SettingsActivity : SimpleActivity() { } } -// private fun tryImportData() { -// if (isQPlus()) { -// Intent(Intent.ACTION_GET_CONTENT).apply { -// addCategory(Intent.CATEGORY_OPENABLE) -// type = "application/json" -// } -// } else { -// handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> -// if (isAllowed) { -// pickFileToImportData() -// } -// } -// } -// } -// -// private fun pickFileToImportData() { -// FilePickerDialog(this) { -// importData(it) -// } -// } -// -// private fun tryImportDataFromFile(uri: Uri) { -// when (uri.scheme) { -// "file" -> importData(uri.path!!) -// "content" -> { -// val tempFile = getTempFile("fossify_clock_data", "fossify_clock_data.json") -// if (tempFile == null) { -// toast(R.string.unknown_error_occurred) -// return -// } -// -// try { -// val inputStream = contentResolver.openInputStream(uri) -// val out = FileOutputStream(tempFile) -// inputStream!!.copyTo(out) -// importData(tempFile.absolutePath) -// } catch (e: Exception) { -// showErrorToast(e) -// } -// } -// -// else -> toast(R.string.invalid_file_format) -// } -// } -// -// private fun importData(path: String) { -// ensureBackgroundThread { -// val result = AlarmsImporter(this, DBHelper.dbInstance!!).importAlarms(path) -// toast( -// when (result) { -// AlarmsImporter.ImportResult.IMPORT_OK -> -// R.string.importing_successful -// AlarmsImporter.ImportResult.IMPORT_FAIL -> R.string.no_items_found -// } -// ) -// } -// } + private fun tryImportData() { + if (isQPlus()) { + Intent(Intent.ACTION_GET_CONTENT).apply { + addCategory(Intent.CATEGORY_OPENABLE) + type = "application/json" + + try { + importActivityResultLauncher.launch(type) + } catch (e: ActivityNotFoundException) { + toast(R.string.system_service_disabled, Toast.LENGTH_LONG) + } catch (e: Exception) { + showErrorToast(e) + } + } + } else { + handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> + if (isAllowed) { + pickFileToImportData() + } + } + } + } + + private fun pickFileToImportData() { + FilePickerDialog(this) { + importData(it) + } + } + + private fun tryImportDataFromFile(uri: Uri) { + when (uri.scheme) { + "file" -> importData(uri.path!!) + "content" -> { + val tempFile = getTempFile("fossify_clock_data", "fossify_clock_data.json") + if (tempFile == null) { + toast(R.string.unknown_error_occurred) + return + } + + try { + val inputStream = contentResolver.openInputStream(uri) + val out = FileOutputStream(tempFile) + inputStream!!.copyTo(out) + importData(tempFile.absolutePath) + } catch (e: Exception) { + showErrorToast(e) + } + } + + else -> toast(R.string.invalid_file_format) + } + } + + private fun importData(path: String) { + ensureBackgroundThread { + val result = DataImporter(this, DBHelper.dbInstance!!, TimerHelper(this)).importData(path) + toast( + when (result) { + DataImporter.ImportResult.IMPORT_OK -> + R.string.importing_successful + + DataImporter.ImportResult.IMPORT_INCOMPLETE -> CR.string.import_incomplete + DataImporter.ImportResult.ALARMS_IMPORT_FAIL -> CR.string.alarms_import_failed + DataImporter.ImportResult.TIMERS_IMPORT_FAIL -> CR.string.timers_import_failed + DataImporter.ImportResult.IMPORT_FAIL -> R.string.no_items_found + } + ) + } + } } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt index fdca4fdc..43f7c626 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt @@ -1,15 +1,16 @@ package org.fossify.clock.helpers -import org.fossify.clock.models.Alarm -import org.fossify.clock.models.Timer +import org.fossify.clock.interfaces.JSONConvertible import org.fossify.commons.helpers.ExportResult +import org.json.JSONArray +import org.json.JSONObject import java.io.OutputStream object DataExporter { fun exportData( - alarms: ArrayList, - timers: List, + alarms: List, + timers: List, outputStream: OutputStream?, callback: (result: ExportResult) -> Unit, ) { @@ -18,14 +19,17 @@ object DataExporter { return } - val alarmsToExport = alarmsToJSON(alarms) - val timersToExport = timersToJSON(timers) + val alarmsJsonArray = toJsonArray(alarms) + val timersJsonArray = toJsonArray(timers) - val dataToExport = "{\"alarms\": $alarmsToExport, \"timers\": $timersToExport" + val jsonObject = JSONObject().apply { + put("alarms", alarmsJsonArray) + put("timers", timersJsonArray) + } try { outputStream.bufferedWriter().use { out -> - out.write(dataToExport) + out.write(jsonObject.toString()) } callback.invoke(ExportResult.EXPORT_OK) } catch (e: Exception) { @@ -33,30 +37,15 @@ object DataExporter { } } - // Replace with a generic later - private fun alarmsToJSON(alarms: List?): String { - if (alarms.isNullOrEmpty()) { - return "[]" + private fun toJsonArray(list: List): JSONArray { + return if (list.isEmpty()) { + JSONArray() + } else { + JSONArray().apply { + list.forEach { item -> + put(JSONObject(item.toJSON())) + } + } } - - val jsonAlarms = mutableListOf() - for (alarm in alarms) { - jsonAlarms.add(alarm.toJSON()) - } - - return "[${jsonAlarms.joinToString(",")}]" - } - - private fun timersToJSON(timers: List?): String { - if (timers.isNullOrEmpty()) { - return "[]" - } - - val jsonTimers = mutableListOf() - for (timer in timers) { - jsonTimers.add(timer.toJSON()) - } - - return "[${jsonTimers.joinToString(",")}]" } } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt index e7262eb1..4ae87958 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt @@ -2,29 +2,47 @@ package org.fossify.clock.helpers import android.app.Activity import org.fossify.clock.models.Alarm +import org.fossify.clock.models.Timer import org.fossify.commons.extensions.showErrorToast import org.json.JSONArray import org.json.JSONObject - import java.io.File class DataImporter( private val activity: Activity, private val dbHelper: DBHelper, + private val timerHelper: TimerHelper ) { + enum class ImportResult { - IMPORT_FAIL, IMPORT_OK + IMPORT_INCOMPLETE, + ALARMS_IMPORT_FAIL, + TIMERS_IMPORT_FAIL, + IMPORT_FAIL, + IMPORT_OK } fun importData(path: String): ImportResult { return try { val inputStream = File(path).inputStream() val jsonString = inputStream.bufferedReader().use { it.readText().trimEnd() } - val jsonArray = JSONArray(jsonString) + val jsonObject = JSONObject(jsonString) + val alarmsFromJson = jsonObject.getJSONArray("alarms") + val timersFromJson = jsonObject.getJSONArray("timers") - val insertedCount = insertAlarmsFromJSON(jsonArray) - if (insertedCount > 0) { - ImportResult.IMPORT_OK + val importedAlarms = insertAlarmsFromJSON(alarmsFromJson) + val importedTimers = insertTimersFromJSON(timersFromJson) + + if (importedAlarms > 0 || importedTimers > 0) { + if (importedAlarms < alarmsFromJson.length() || importedTimers < timersFromJson.length()) { + ImportResult.IMPORT_INCOMPLETE + } else { + ImportResult.IMPORT_OK + } + } else if (importedAlarms == 0) { + ImportResult.ALARMS_IMPORT_FAIL + } else if (importedTimers == 0) { + ImportResult.TIMERS_IMPORT_FAIL } else { ImportResult.IMPORT_FAIL } @@ -34,41 +52,35 @@ class DataImporter( } } + private fun insertAlarmsFromJSON(jsonArray: JSONArray): Int { var insertedCount = 0 for (i in 0 until jsonArray.length()) { val jsonObject = jsonArray.getJSONObject(i) - val alarm = parseAlarmFromJSON(jsonObject) - val insertedId = dbHelper.insertAlarm(alarm) - if (insertedId != -1) { - insertedCount++ + if (Alarm.parseFromJSON(jsonObject) != null) { + val alarm = Alarm.parseFromJSON(jsonObject) as Alarm + if (dbHelper.insertAlarm(alarm) != -1) { + insertedCount++ + } } } return insertedCount } - private fun parseAlarmFromJSON(jsonObject: JSONObject): Alarm { - val id = jsonObject.getInt("id") - val timeInMinutes = jsonObject.getInt("timeInMinutes") - val days = jsonObject.getInt("days") - val isEnabled = jsonObject.getBoolean("isEnabled") - val vibrate = jsonObject.getBoolean("vibrate") - val soundTitle = jsonObject.getString("soundTitle") - val soundUri = jsonObject.getString("soundUri") - val label = jsonObject.getString("label") - val oneShot = jsonObject.optBoolean("oneShot", false) - - return Alarm( - id, - timeInMinutes, - days, - isEnabled, - vibrate, - soundTitle, - soundUri, - label, - oneShot - ) + private fun insertTimersFromJSON(jsonArray: JSONArray): Int { + var insertedCount = 0 + for (i in 0 until jsonArray.length()) { + val jsonObject = jsonArray.getJSONObject(i) + if (Timer.parseFromJSON(jsonObject) != null) { + val timer = Timer.parseFromJSON(jsonObject) as Timer + timerHelper.insertOrUpdateTimer(timer) { id -> + if (id != -1L) { + insertedCount++ + } + } + } + } + return insertedCount } } diff --git a/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt b/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt new file mode 100644 index 00000000..b0977b11 --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt @@ -0,0 +1,5 @@ +package org.fossify.clock.interfaces + +interface JSONConvertible { + fun toJSON(): String +} diff --git a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt index 17b9d523..674986c5 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt @@ -1,6 +1,7 @@ package org.fossify.clock.models import androidx.annotation.Keep +import org.fossify.clock.interfaces.JSONConvertible import org.json.JSONObject @Keep @@ -14,21 +15,53 @@ data class Alarm( var soundUri: String, var label: String, var oneShot: Boolean = false, -) { - @Keep - fun toJSON(): String { +) : JSONConvertible { + override fun toJSON(): String { val jsonObject = JSONObject() jsonObject.put("id", id) jsonObject.put("timeInMinutes", timeInMinutes) jsonObject.put("days", days) - jsonObject.put("isEnabled", isEnabled) jsonObject.put("vibrate", vibrate) jsonObject.put("soundTitle", soundTitle) jsonObject.put("soundUri", soundUri) jsonObject.put("label", label) - jsonObject.put("oneShot", oneShot) return jsonObject.toString() } + + companion object { + fun parseFromJSON(jsonObject: JSONObject): Alarm? { + + if (!jsonObject.has("id") || + !jsonObject.has("timeInMinutes") || + !jsonObject.has("days") || + !jsonObject.has("vibrate") || + !jsonObject.has("soundTitle") || + !jsonObject.has("soundUri") || + !jsonObject.has("label") + ) { + return null + } + + val id = jsonObject.getInt("id") + val timeInMinutes = jsonObject.getInt("timeInMinutes") + val days = jsonObject.getInt("days") + val vibrate = jsonObject.getBoolean("vibrate") + val soundTitle = jsonObject.getString("soundTitle") + val soundUri = jsonObject.getString("soundUri") + val label = jsonObject.getString("label") + + return Alarm( + id, + timeInMinutes, + days, + false, + vibrate, + soundTitle, + soundUri, + label + ) + } + } } @Keep diff --git a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt index 3f237049..523af0d8 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt @@ -3,6 +3,7 @@ package org.fossify.clock.models import androidx.annotation.Keep import androidx.room.Entity import androidx.room.PrimaryKey +import org.fossify.clock.interfaces.JSONConvertible import org.json.JSONObject @Entity(tableName = "timers") @@ -18,21 +19,54 @@ data class Timer( var createdAt: Long, var channelId: String? = null, var oneShot: Boolean = false, -) { - @Keep - fun toJSON(): String { +) : JSONConvertible { + override fun toJSON(): String { val jsonObject = JSONObject() jsonObject.put("id", id) - jsonObject.put("state", state) + jsonObject.put("seconds", seconds) jsonObject.put("vibrate", vibrate) jsonObject.put("soundUri", soundUri) jsonObject.put("soundTitle", soundTitle) jsonObject.put("label", label) jsonObject.put("createdAt", createdAt) - jsonObject.put("channelId", channelId) jsonObject.put("oneShot", oneShot) return jsonObject.toString() } + + companion object { + fun parseFromJSON(jsonObject: JSONObject): Timer? { + + if (!jsonObject.has("id") || + !jsonObject.has("seconds") || + !jsonObject.has("vibrate") || + !jsonObject.has("soundUri") || + !jsonObject.has("soundTitle") || + !jsonObject.has("label") || + !jsonObject.has("createdAt") + ) { + return null + } + + val id = jsonObject.getInt("id") + val second = jsonObject.getInt("seconds") + val vibrate = jsonObject.getBoolean("vibrate") + val soundUri = jsonObject.getString("soundUri") + val soundTitle = jsonObject.getString("soundTitle") + val label = jsonObject.getString("label") + val createdAt = jsonObject.getLong("createdAt") + + return Timer( + id, + second, + TimerState.Idle, + vibrate, + soundUri, + soundTitle, + label, + createdAt + ) + } + } } @Keep diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b7067627..9d9385fc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -55,7 +55,11 @@ Import app data (Alarms and Timers) Export data Export app data (Alarms and Timers) - Exporting aborted by user + Exporting aborted + Importing aborted + Importing alarms failed + Importing timers failed + Partial import due to wrong data How can I change lap sorting at the stopwatch tab? From e253c564ab758ea9eb3c2ef5397c462aa47c698b Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Sun, 21 Apr 2024 11:43:10 +0300 Subject: [PATCH 005/104] Updated strings and remove action aborted toast messages --- .../clock/activities/SettingsActivity.kt | 14 ++++---- app/src/main/res/layout/activity_settings.xml | 34 +++++-------------- app/src/main/res/values/strings.xml | 10 ++---- 3 files changed, 18 insertions(+), 40 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 8046e92b..5b7334f1 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -198,8 +198,6 @@ class SettingsActivity : SimpleActivity() { val outputStream = uri?.let { contentResolver.openOutputStream(it) } if (outputStream != null) { exportDataTo(outputStream) - } else { - toast(CR.string.exporting_aborted) } } catch (e: Exception) { showErrorToast(e) @@ -207,10 +205,12 @@ class SettingsActivity : SimpleActivity() { } private val importActivityResultLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) { uri -> - if (uri != null) { - tryImportDataFromFile(uri) - } else { - toast(CR.string.importing_aborted) + try { + if (uri != null) { + tryImportDataFromFile(uri) + } + } catch (e: Exception) { + showErrorToast(e) } } @@ -326,7 +326,7 @@ class SettingsActivity : SimpleActivity() { DataImporter.ImportResult.IMPORT_OK -> R.string.importing_successful - DataImporter.ImportResult.IMPORT_INCOMPLETE -> CR.string.import_incomplete + DataImporter.ImportResult.IMPORT_INCOMPLETE -> R.string.importing_some_entries_failed DataImporter.ImportResult.ALARMS_IMPORT_FAIL -> CR.string.alarms_import_failed DataImporter.ImportResult.TIMERS_IMPORT_FAIL -> CR.string.timers_import_failed DataImporter.ImportResult.IMPORT_FAIL -> R.string.no_items_found diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index dba596ab..0eeaaba5 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -284,16 +284,16 @@ - + - + - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9d9385fc..c6fc3b41 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -50,16 +50,10 @@ Timer tab Show seconds Increase volume gradually - Export and import - Import data - Import app data (Alarms and Timers) - Export data - Export app data (Alarms and Timers) - Exporting aborted - Importing aborted + Import alarms and timers + Export alarms and timers Importing alarms failed Importing timers failed - Partial import due to wrong data How can I change lap sorting at the stopwatch tab? From 5e904c50d939ab7d39d48e4b94d57600bc524713 Mon Sep 17 00:00:00 2001 From: Naveen Singh <36371707+naveensingh@users.noreply.github.com> Date: Sun, 21 Apr 2024 17:27:24 +0530 Subject: [PATCH 006/104] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e39c0f1..d5d91426 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Fossify Clock Logo -Get it on F-Droid Get it on IzzyOnDroid +Get it on Google Play Get it on F-Droid Get it on IzzyOnDroid Introducing Fossify Clock – the ultimate timekeeping companion designed to enhance your daily routines and promote better sleep habits. With a multitude of functions tailored to your needs, Fossify Clock seamlessly integrates into your life, offering unparalleled convenience and versatility. From b81eab7ddf565530a83e35e5cebb1a5230617612 Mon Sep 17 00:00:00 2001 From: gallegonovato Date: Sun, 24 Mar 2024 10:36:44 +0100 Subject: [PATCH 007/104] Added translation using Weblate (Spanish) --- fastlane/metadata/android/fr-FR/changelogs/42.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/fr-FR/changelogs/42.txt diff --git a/fastlane/metadata/android/fr-FR/changelogs/42.txt b/fastlane/metadata/android/fr-FR/changelogs/42.txt new file mode 100644 index 00000000..101f74b5 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/42.txt @@ -0,0 +1,2 @@ +* Correction de quelques problèmes liés aux alarmes + * Amélioration de l'interface utilisateur, de la traduction et de la stabilité From 162b37c816d0368336c8a86595f110fb7cc33a2e Mon Sep 17 00:00:00 2001 From: Agnieszka C Date: Sun, 24 Mar 2024 08:23:06 +0000 Subject: [PATCH 008/104] Translated using Weblate (Polish) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/pl/ --- .../android/pl-PL/full_description.txt | 32 +++++++++++++++++++ .../android/pl-PL/short_description.txt | 1 + fastlane/metadata/android/pl-PL/title.txt | 1 + 3 files changed, 34 insertions(+) create mode 100644 fastlane/metadata/android/pl-PL/full_description.txt create mode 100644 fastlane/metadata/android/pl-PL/short_description.txt create mode 100644 fastlane/metadata/android/pl-PL/title.txt diff --git a/fastlane/metadata/android/pl-PL/full_description.txt b/fastlane/metadata/android/pl-PL/full_description.txt new file mode 100644 index 00000000..73355635 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/full_description.txt @@ -0,0 +1,32 @@ +Przedstawiamy Fossify Clock – najlepszy towarzysz mierzący czas zaprojektowany w celu usprawnienia Twoich codziennych czynności i promowania lepszych nawyków związanych ze snem. Dzięki mnóstwu funkcji dostosowanych do Twoich potrzeb Fossify Clock bezproblemowo integruje się z Twoim życiem, oferując niezrównaną wygodę i wszechstronność. + +⌚ WIELOFUNKCYJNY POMIAR CZASU: +Doświadcz mocy wszechstronnego zarządzania czasem z Fossify Clock. Od bycia widżetem zegara po funkcjonowanie jako alarm i stoper aplikacja ta jest Twoim podstawowym narzędziem do regulowania codziennych aktywności i poprawy Twojego ogólnego stylu życia. + +⏰ BOGATY W FUNKCJE ALARM: +Obudź się wypoczęty(-a) dzięki kompleksowym funkcjom alarmu Fossify Clock. Ustaw wiele alarmów z opcjami takimi jak wybór dnia, przełączanie wibracji, niestandardowe etykiety i dostosowywanie dzwonka. Ciesz się stopniowym zwiększaniem głośności i konfigurowalnym przyciskiem drzemki, aby zapewnić przyjemne budzenie się. Dzięki przyjaznemu dla użytkownika interfejsowi ustawianie alarmów nigdy nie było prostsze. + +⏱️ WYGODNY STOPER: +Śledź swoje aktywności z precyzją, korzystając z funkcji stopera Fossify Clock. Bezproblemowo mierz dłuższe okresy lub pojedyncze okrążenia. Możesz także sortować swoje okrążenia w kolejności rosnącej lub malejącej. + +⏳ PRECYZYJNA FUNKCJA MINUTNIKA: +Bądź na bieżąco ze swoimi zadaniami dzięki wszechstronnej funkcji minutnika Fossify Clock. Dostosowuj preferencje dzwonka, przełączaj wibracje i wstrzymuj odliczanie, aby dopasować je do swoich potrzeb. Niezależnie od tego, czy odmierzasz czas gotowania, zarządzasz czasem uczenia się, czy zapewniasz sobie chwilowe przerwy, Fossify Clock zapewni Ci precyzję i łatwość. + +🌈 WIDŻET ZEGARA Z KONFIGUROWALNYMI FUNKCJAMI: +Zmień swój ekran główny za pomocą konfigurowalnego widżetu zegara Fossify Clock. Dostosuj kolor tekstu, kolor tła i przezroczystość. Wybierz między zegarem analogowym a cyfrowym, aby dopasować go do Twojego stylu i łatwo uzyskać dostęp do najważniejszych informacji o czasie w mgnieniu oka. + +🎨 KONFIGUROWALNY INTERFEJS I MOTYWY: +Ciesz się spersonalizowanym doświadczeniem Fossify Clock dzięki Material Design i opcjom ciemnego motywu. Dostosuj aplikację do swoich preferencji dzięki konfigurowalnym kolorom i motywom, ulepszając użyteczność i redukując zmęczenie oczu szczególnie w warunkach słabego oświetlenia. + +🔒 PRZEDE WSZYSTKIM PRYWATNOŚĆ: +Miej pewność, że Twoja prywatność jest chroniona, dzięki działaniu offline Fossify Clock. Doświadcz maksymalnej prywatności, bezpieczeństwa i stabilności bez poświęcania funkcjonalności i wygody. + +🌐 BEZ REKLAM I OTWARTOŹRÓDŁOWOŚĆ: +Pożegnaj natrętne reklamy i niepotrzebne uprawnienia. Fossify Clock jest wolny od reklam, w pełni otwartoźródłowy i zapewnia Ci pełną kontrolę nad doświadczeniem pomiaru czasu. + +Ulepsz swoje umiejętności zarządzania czasem, zoptymalizuj swoje rutyny i nadaj priorytet lepszemu snu z Fossify Clock. Pobierz teraz i przejmij kontrolę nad swoim czasem jak nigdy dotąd. + +Odkryj więcej aplikacji od Fossify: https://www.fossify.org +Kod źródłowy: https://www.github.com/FossifyOrg +Dołącz do społeczności na Reddicie: https://www.reddit.com/r/Fossify +Połącz się na Telegramie: https://t.me/Fossify diff --git a/fastlane/metadata/android/pl-PL/short_description.txt b/fastlane/metadata/android/pl-PL/short_description.txt new file mode 100644 index 00000000..eb0f6e2e --- /dev/null +++ b/fastlane/metadata/android/pl-PL/short_description.txt @@ -0,0 +1 @@ +Poręczna, lekka, otwartoźródłowa aplikacja zegara z niezbędnymi funkcjami diff --git a/fastlane/metadata/android/pl-PL/title.txt b/fastlane/metadata/android/pl-PL/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/pl-PL/title.txt @@ -0,0 +1 @@ +Fossify Clock From 80697250f6922c8bb9329279749701f94c48d592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=8E=8B=E5=8F=AB=E6=88=91=E6=9D=A5=E5=B7=A1?= =?UTF-8?q?=E5=B1=B1?= Date: Sun, 24 Mar 2024 02:19:47 +0000 Subject: [PATCH 009/104] Translated using Weblate (Chinese (Simplified)) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hans/ --- fastlane/metadata/android/zh-CN/short_description.txt | 2 +- fastlane/metadata/android/zh-CN/title.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/zh-CN/title.txt diff --git a/fastlane/metadata/android/zh-CN/short_description.txt b/fastlane/metadata/android/zh-CN/short_description.txt index d12f2774..cfb16597 100644 --- a/fastlane/metadata/android/zh-CN/short_description.txt +++ b/fastlane/metadata/android/zh-CN/short_description.txt @@ -1 +1 @@ -华丽时钟小工具、闹钟、秒表、计时器的集合 +趁手、轻量、开源的时钟应用,具有必要的功能。 diff --git a/fastlane/metadata/android/zh-CN/title.txt b/fastlane/metadata/android/zh-CN/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/zh-CN/title.txt @@ -0,0 +1 @@ +Fossify Clock From 9624933c181489b83ac3efb720eca8807fa6236d Mon Sep 17 00:00:00 2001 From: gallegonovato Date: Sun, 24 Mar 2024 09:41:33 +0000 Subject: [PATCH 010/104] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/es/ --- .../metadata/android/es-ES/changelogs/1.txt | 1 + .../android/es-ES/full_description.txt | 32 +++++++++++++++++++ .../android/es-ES/short_description.txt | 1 + fastlane/metadata/android/es-ES/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/es-ES/changelogs/1.txt create mode 100644 fastlane/metadata/android/es-ES/full_description.txt create mode 100644 fastlane/metadata/android/es-ES/short_description.txt create mode 100644 fastlane/metadata/android/es-ES/title.txt diff --git a/fastlane/metadata/android/es-ES/changelogs/1.txt b/fastlane/metadata/android/es-ES/changelogs/1.txt new file mode 100644 index 00000000..a1f6c8d3 --- /dev/null +++ b/fastlane/metadata/android/es-ES/changelogs/1.txt @@ -0,0 +1 @@ +* Versión inicial. diff --git a/fastlane/metadata/android/es-ES/full_description.txt b/fastlane/metadata/android/es-ES/full_description.txt new file mode 100644 index 00000000..01274f8c --- /dev/null +++ b/fastlane/metadata/android/es-ES/full_description.txt @@ -0,0 +1,32 @@ +Presentamos Fossify Clock – el compañero de cronometraje definitivo diseñado para mejorar sus rutinas diarias y promover mejores hábitos de sueño. Con una multitud de funciones adaptadas a sus necesidades, Fossify Clock se integra perfectamente en su vida, ofreciendo comodidad y versatilidad sin precedentes. + +⌚ CRONOMETRAJE MULTIFUNCIONAL: +Experimente el poder de la gestión del tiempo versátil con Fossify Clock. Desde un widget de reloj hasta un despertador y cronómetro, esta aplicación es tu herramienta preferida para regular tus actividades diarias y mejorar tu estilo de vida en general. + +⏰ ALARMA RICA EN CARACTERÍSTICAS: +Despiértese renovado con las funciones de alarma integrales de Fossify Clock. Configure múltiples alarmas con opciones como selección de día, interruptor de vibración, etiquetas personalizadas y personalización de tonos de llamada. Disfrute de un aumento gradual del volumen y un botón de repetición personalizable para una agradable experiencia de despertar. Con una interfaz fácil de usar, la configuración de alarmas nunca ha sido tan fácil. + +⏱️ CRONÓMETRO CONVENIENTE: +Realiza un seguimiento de tus actividades con precisión utilizando la función de cronómetro de Fossify Clock. Mida períodos más largos o vueltas individuales sin esfuerzo. También puedes ordenar tus vueltas en orden ascendente o descendente. + +⏳ FUNCIONALIDAD DE TEMPORIZADOR PRECISO: +Manténgase al tanto de sus tareas con la versátil función de temporizador de Fossify Clock. Personaliza las preferencias de tonos de llamada, cambia las vibraciones y pausa la cuenta atrás para satisfacer tus necesidades. Ya sea que esté programando intervalos de cocción, administrando sesiones de estudio o asegurando descansos oportunos, Fossify Clock lo tiene cubierto con precisión y facilidad. + +🌈 RELOJ WIDGET CON CARACTERÍSTICAS PERSONALIZABLES: +Transforma tu pantalla de inicio con el widget de reloj personalizable de Fossify Clock. Ajuste el color del texto, el color de fondo y la transparencia. Elija entre reloj analógico o digital para adaptarse a su estilo y acceder fácilmente a la información de tiempo esencial de un vistazo. + +🎨 INTERFAZ PERSONALIZABLE Y TEMAS: +Disfruta de una experiencia personalizada con material design y opciones de temas oscuros de Fossify Clock. Adapta la aplicación a tus preferencias con colores y temas personalizables, mejorando la usabilidad y reduciendo la fatiga visual, especialmente en entornos con poca luz. + +🔒 LA PRIVACIDAD ES LO PRIMERO: +Tenga la seguridad de saber que su privacidad está protegida con el funcionamiento fuera de línea de Fossify Clock. Disfrute de la máxima privacidad, seguridad y estabilidad sin sacrificar funcionalidad o conveniencia. + +🌐 SIN ANUNCIOS Y DE CÓDIGO ABIERTO: +Diga adiós a los anuncios intrusivos y a los permisos innecesarios. Fossify Clock está libre de anuncios, es totalmente de código abierto y le otorga un control completo sobre su experiencia de cronometraje. + +Mejore sus habilidades de gestión del tiempo, optimice sus rutinas y priorice un mejor sueño con Fossify Clock. Descarga ahora y toma el control de tu tiempo como nunca antes. + +Explore más aplicaciones de Fossify: https://www.fossify.org +Código abierto: https://www.github.com/FossifyOrg +Únete a la comunidad en Reddit: https://www.reddit.com/r/Fossify +Conéctese con Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/es-ES/short_description.txt b/fastlane/metadata/android/es-ES/short_description.txt new file mode 100644 index 00000000..3b5adaf6 --- /dev/null +++ b/fastlane/metadata/android/es-ES/short_description.txt @@ -0,0 +1 @@ +Reloj práctico, ligero y de código abierto con funciones esenciales. diff --git a/fastlane/metadata/android/es-ES/title.txt b/fastlane/metadata/android/es-ES/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/es-ES/title.txt @@ -0,0 +1 @@ +Fossify Clock From 6b8370f5871a91562e22fdcf74a531d9080bed75 Mon Sep 17 00:00:00 2001 From: Giovanni Donisi Date: Sun, 24 Mar 2024 20:02:36 +0000 Subject: [PATCH 011/104] Translated using Weblate (Italian) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/it/ --- .../android/it-IT/full_description.txt | 32 +++++++++++++++++++ .../android/it-IT/short_description.txt | 1 + fastlane/metadata/android/it-IT/title.txt | 1 + 3 files changed, 34 insertions(+) create mode 100644 fastlane/metadata/android/it-IT/full_description.txt create mode 100644 fastlane/metadata/android/it-IT/short_description.txt create mode 100644 fastlane/metadata/android/it-IT/title.txt diff --git a/fastlane/metadata/android/it-IT/full_description.txt b/fastlane/metadata/android/it-IT/full_description.txt new file mode 100644 index 00000000..4bdaf57e --- /dev/null +++ b/fastlane/metadata/android/it-IT/full_description.txt @@ -0,0 +1,32 @@ +Orologio Fossify è l'ultimo compagno per la misurazione dell'ora, progettato per migliorare le tue abitudini quotidiane e favorire un sonno migliore. Con una moltitudine di funzioni adatte alle tue esigenze, Orologio Fossify si integra perfettamente nella tua vita, offrendo una comodità e una versatilità senza pari. + +⌚ CRONOMETRAGGIO MULTIFUNZIONALE: +Sperimenta la potenza di una gestione versatile del tempo con Orologio Fossify. Dal widget dell'orologio alla sveglia e al cronometro, questa applicazione è lo strumento ideale per regolare le attività quotidiane e migliorare lo stile di vita generale. + +⏰ SVEGLIA RICCA DI FUNZIONI: +Svegliati rinfrescato con le funzioni di sveglia complete di Orologio Fossify. Imposta più sveglie con opzioni come la selezione del giorno, l'attivazione della vibrazione, le etichette personalizzate e la personalizzazione della suoneria. L'aumento graduale del volume e il pulsante snooze personalizzabile garantiscono una piacevole esperienza di risveglio. Grazie all'interfaccia intuitiva, impostare le sveglie non è mai stato così facile. + +⏱️ COMODO CRONOMETRO: +Traccia le tue attività con precisione grazie alla funzione cronometro di Orologio Fossify. Misura periodi più lunghi o singoli giri senza fatica. È anche possibile ordinare i giri in ordine crescente o decrescente. + +⏳ FUNZIONALITÀ DI TIMER PRECISO: +Rimani in cima alle tue attività con la versatile funzione timer di Orologio Fossify. Personalizza le preferenze della suoneria, attiva le vibrazioni e metti in pausa i conti alla rovescia in base alle tue esigenze. Che si tratti di cronometrare gli intervalli di cottura, di gestire le sessioni di studio o di garantire pause tempestive, Orologio Fossify ti copre con precisione e facilità. + +🌈 WIDGET OROLOGIO CON FUNZIONI PERSONALIZZABILI: +Trasforma la tua schermata iniziale con il widget orologio personalizzabile di Orologio Fossify. Regola il colore del testo, il colore dello sfondo e la trasparenza. Scegli tra orologio analogico o digitale per adattarlo al tuo stile e accedi facilmente alle informazioni essenziali sull'ora con un solo sguardo. + +🎨 INTERFACCIA E TEMI PERSONALIZZABILI: +Goditi un'esperienza personalizzata con il material design di Orologio Fossify e le opzioni dei temi scuri. Adatta l'app alle tue preferenze con colori e temi personalizzabili, migliorando l'usabilità e riducendo l'affaticamento degli occhi, soprattutto in ambienti con scarsa illuminazione. + +🔒 APPROCCIO ORIENTATO ALLA PRIVACY: +Sii certo che la tua privacy è protetta grazie al funzionamento offline di Orologio Fossify. Sperimenta la massima privacy, sicurezza e stabilità senza sacrificare la funzionalità o la convenienza. + +🌐 SENZA PUBBLICITÀ E OPEN-SOURCE: +Di' addio agli annunci invadenti e alle autorizzazioni non necessarie. Orologio Fossify è privo di pubblicità, completamente open-source e ti garantisce il controllo completo della tua esperienza di misurazione del tempo. + +Migliora le tue capacità di gestione del tempo, ottimizza le tue routine e dai priorità a un sonno migliore con Orologio Fossify. Scaricalo subito e prendiil controllo del tuo tempo come mai prima d'ora. + +Esplora altre applicazioni Fossify: https://www.fossify.org +Codice open-source: https://www.github.com/FossifyOrg +Unisciti alla comunità su Reddit: https://www.reddit.com/r/Fossify +Connettiti su Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/it-IT/short_description.txt b/fastlane/metadata/android/it-IT/short_description.txt new file mode 100644 index 00000000..61f41227 --- /dev/null +++ b/fastlane/metadata/android/it-IT/short_description.txt @@ -0,0 +1 @@ +Un'app per l'orologio pratica, leggera e open-source con funzioni essenziali. diff --git a/fastlane/metadata/android/it-IT/title.txt b/fastlane/metadata/android/it-IT/title.txt new file mode 100644 index 00000000..f9f19c48 --- /dev/null +++ b/fastlane/metadata/android/it-IT/title.txt @@ -0,0 +1 @@ +Orologio Fossify From a9dfe69d25ec0c93889fc26ad16dbb87cfd46743 Mon Sep 17 00:00:00 2001 From: VfBFan Date: Mon, 25 Mar 2024 12:57:45 +0000 Subject: [PATCH 012/104] Translated using Weblate (German) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/de/ --- app/src/main/res/values-de/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index dd8627dd..7c0dc69a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -45,4 +45,6 @@ Ansteigende Lautstärke Wie kann die Sortierung der Laschen der Stoppuhr geändert werden? Einfach auf eine der Spalten klicken, das wird die Sortierung entsprechend der Spalte anpassen. Weitere Klicks schalten zwischen auf- und absteigender Sortierung um. - + Timer + Timer + \ No newline at end of file From 2c84ccbeb8112d227b26c67b3c6d0cc1fd9ead20 Mon Sep 17 00:00:00 2001 From: VfBFan Date: Mon, 25 Mar 2024 12:40:36 +0000 Subject: [PATCH 013/104] Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/de/ --- .../metadata/android/de-DE/changelogs/1.txt | 1 + .../android/de-DE/full_description.txt | 32 +++++++++++++++++++ .../android/de-DE/short_description.txt | 1 + fastlane/metadata/android/de-DE/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/de-DE/changelogs/1.txt create mode 100644 fastlane/metadata/android/de-DE/full_description.txt create mode 100644 fastlane/metadata/android/de-DE/short_description.txt create mode 100644 fastlane/metadata/android/de-DE/title.txt diff --git a/fastlane/metadata/android/de-DE/changelogs/1.txt b/fastlane/metadata/android/de-DE/changelogs/1.txt new file mode 100644 index 00000000..4ca8d170 --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/1.txt @@ -0,0 +1 @@ +* Erste Veröffentlichung. diff --git a/fastlane/metadata/android/de-DE/full_description.txt b/fastlane/metadata/android/de-DE/full_description.txt new file mode 100644 index 00000000..98b9e390 --- /dev/null +++ b/fastlane/metadata/android/de-DE/full_description.txt @@ -0,0 +1,32 @@ +Fossify Clock ist der ultimative Begleiter für die Zeitmessung, der deine täglichen Routinen verbessert und deine Schlafgewohnheiten fördert. Mit einer Vielzahl von Funktionen, die auf deine Bedürfnisse zugeschnitten sind, fügt sich Fossify Clock nahtlos in dein Leben ein und bietet unvergleichlichen Komfort und Vielseitigkeit. + +⌚ MULTIFUNKTIONALE ZEITMESSUNG: +Erlebe die Macht des vielseitigen Zeitmanagements mit Fossify Clock. Ob als Uhren-Widget, Wecker oder Stoppuhr – mit dieser App kannst du deine täglichen Aktivitäten regulieren und deinen Lebensstil verbessern. + +⏰ FUNKTIONSREICHER ALARM: +Mit den umfassenden Alarmfunktionen von Fossify Clock wachst du erfrischt auf. Stelle mehrere Alarme mit Optionen wie Tagesauswahl, Vibration, benutzerdefinierte Beschriftung und Klingeltonanpassung ein. Genieße die schrittweise Erhöhung der Lautstärke und eine anpassbare Schlummertaste für ein angenehmes Aufwachen. Dank der benutzerfreundlichen Oberfläche war es noch nie so einfach, Alarme einzurichten. + +⏱️ PRAKTISCHE STOPPUHR: +Mit der Stoppuhrfunktion von Fossify Clock kannst du deine Aktivitäten genau verfolgen. Messe mühelos längere Zeiträume oder einzelne Runden. Du kannst deine Runden auch in aufsteigender oder absteigender Reihenfolge sortieren. + +⏳ PRÄZISE TIMER-FUNKTION: +Mit der vielseitigen Timer-Funktion von Fossify Clock behältst du den Überblick über deine Aufgaben. Du kannst den Klingelton einstellen, die Vibration einschalten und die Countdowns anhalten. Ganz gleich, ob du Kochintervalle zeitlich festlegen, Lernsessions verwalten oder rechtzeitig Pausen einlegen willst, Fossify Clock bietet dir Präzision und Leichtigkeit. + +🌈 UHR-WIDGET MIT ANPASSBAREN FUNKTIONEN: +Verändere deinen Startbildschirm mit dem anpassbaren Uhren-Widget von Fossify Clock. Passe Textfarbe, Hintergrundfarbe und Transparenz an. Wähle zwischen analoger oder digitaler Uhr, um deinen Stil zu unterstreichen und die wichtigsten Zeitinformationen auf einen Blick zu sehen. + +🎨 ANPASSBARE OBERFLÄCHE UND FARBSCHEMAS: +Genieße ein individuelles Erlebnis mit dem Material Design und den dunklen Farbschemas von Fossify Clock. Passe die App mit anpassbaren Farben und Farbschemas an deine Vorlieben an, um die Benutzerfreundlichkeit zu verbessern und die Augen zu entlasten, besonders in schwach beleuchteten Umgebungen. + +🔒 PRIVATSPHÄRE STEHT AN ERSTER STELLE: +Du kannst sicher sein, dass deine Privatsphäre durch den Offline-Betrieb von Fossify Clock geschützt ist. Erlebe ein Maximum an Privatsphäre, Sicherheit und Stabilität, ohne auf Funktionalität oder Komfort verzichten zu müssen. + +🌐 WERBEFREI & OPEN SOURCE: +Verabschiede dich von aufdringlicher Werbung und unnötigen Berechtigungen. Fossify Clock ist werbefrei, vollständig quelloffen und gibt dir die volle Kontrolle über deine Zeiterfassung. + +Verbessere dein Zeitmanagement, optimiere deine Routinen und sorge für besseren Schlaf mit Fossify Clock. Lade die App jetzt herunter und übernimm die Kontrolle über deine Zeit wie nie zuvor. + +Entdecke weitere Apps von Fossify: https://www.fossify.org +Open-Source-Code: https://www.github.com/FossifyOrg +Tritt der Community auf Reddit bei: https://www.reddit.com/r/Fossify +Verbinde dich auf Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/de-DE/short_description.txt b/fastlane/metadata/android/de-DE/short_description.txt new file mode 100644 index 00000000..927ae412 --- /dev/null +++ b/fastlane/metadata/android/de-DE/short_description.txt @@ -0,0 +1 @@ +Nützliche, schlanke, quelloffene Uhr-App mit grundlegenden Funktionen. diff --git a/fastlane/metadata/android/de-DE/title.txt b/fastlane/metadata/android/de-DE/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/de-DE/title.txt @@ -0,0 +1 @@ +Fossify Clock From 621d6a5e867bcf95d089c7182f22b935372e2ab6 Mon Sep 17 00:00:00 2001 From: "Josep M. Ferrer" Date: Tue, 26 Mar 2024 12:39:34 +0000 Subject: [PATCH 014/104] Translated using Weblate (Catalan) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ca/ --- app/src/main/res/values-ca/strings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 44f79b0b..e28d5959 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -14,7 +14,7 @@ El temps ha caducat Rellotge i data Utilitza l\'ombra del text - Feu lliscar el dit cap a la dreta per ignorar, cap a l\'esquerra per posposar. + Feu lliscar el dit cap a la dreta per a ignorar, cap a l\'esquerra per a posposar. Ordre de creació Hora d\'alarma Dia i hora d\'alarma @@ -34,6 +34,7 @@ Temporitzador nou %d temporitzador en marxa + %d temporitzadors en marxa %d temporitzadors en marxa Pestanya del rellotge @@ -47,4 +48,4 @@ Afegeix un temporitzador Rellotge Afegeix una alarma - + \ No newline at end of file From 32cf21b91cba7b1c99a00e3dc37c073e4e9383eb Mon Sep 17 00:00:00 2001 From: "Josep M. Ferrer" Date: Tue, 26 Mar 2024 12:28:50 +0000 Subject: [PATCH 015/104] Translated using Weblate (Catalan) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/ca/ --- fastlane/metadata/android/ca/changelogs/1.txt | 1 + .../metadata/android/ca/full_description.txt | 32 +++++++++++++++++++ .../metadata/android/ca/short_description.txt | 1 + fastlane/metadata/android/ca/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/ca/changelogs/1.txt create mode 100644 fastlane/metadata/android/ca/full_description.txt create mode 100644 fastlane/metadata/android/ca/short_description.txt create mode 100644 fastlane/metadata/android/ca/title.txt diff --git a/fastlane/metadata/android/ca/changelogs/1.txt b/fastlane/metadata/android/ca/changelogs/1.txt new file mode 100644 index 00000000..aa2a1fa4 --- /dev/null +++ b/fastlane/metadata/android/ca/changelogs/1.txt @@ -0,0 +1 @@ +* Llançament inicial. diff --git a/fastlane/metadata/android/ca/full_description.txt b/fastlane/metadata/android/ca/full_description.txt new file mode 100644 index 00000000..ad1e892d --- /dev/null +++ b/fastlane/metadata/android/ca/full_description.txt @@ -0,0 +1,32 @@ +Presentem el Fossify Clock, l'acompanyant definitiu de control del temps dissenyat per a millorar les vostres rutines diàries i promoure hàbits millors de son. Amb multitud de funcions adaptades a les vostres necessitats, el Fossify Clock s'integra perfectament a la vostra vida, oferint una comoditat i versatilitat incomparables. + +⌚ CONTROL DEL TEMPS MULTIFUNCIONAL: +Experimenteu la potència de la gestió versàtil del temps amb el Fossify Clock. Des de servir com a giny de rellotge fins a funcionar com a despertador i cronòmetre, aquesta aplicació és l'eina de referència per a regular les activitats diàries i millorar l'estil de vida general. + +⏰ ALARMA PLENA DE CARACTERÍSTIQUES: +Desperteu-vos fresc amb les característiques integrals d'alarma del Fossify Clock. Establiu diverses alarmes amb opcions com selecció de dia, commutador de vibració, etiquetes personalitzades i personalització de tons de trucada. Gaudiu d'un augment gradual del volum i d'un botó de posposar personalitzable per a una experiència agradable en despertar. Amb una interfície fàcil d'usar, la configuració d'alarmes mai ha estat tan fàcil. + +⏱️ CRONÒMETRE PRÀCTIC: +Feu un seguiment de les vostres activitats amb precisió utilitzant la funció de cronòmetre del Fossify Clock. Mesureu períodes més llargs o voltes individuals sense esforç. També podeu ordenar les voltes en ordre ascendent o descendent. + +⏳ FUNCIONALITAT PRECISA DEL TEMPORITZADOR: +Seguiu les tasques amb la funció versàtil del temporitzador del Fossify Clock. Personalitzeu les preferències de to de trucada, commuteu les vibracions i feu pausa del compte enrere segons les vostres necessitats. Tant si esteu programant intervals de cocció, gestionant sessions d'estudi o assegurant descansos puntuals, el Fossify Clock us dona cobertura amb precisió i facilitat. + +🌈 GINY DE RELLOTGE AMB CARACTERÍSTIQUES PERSONALITZABLES: +Transformeu la pantalla d'inici amb el giny de rellotge personalitzable del Fossify Clock. Ajusteu el color del text, el color de fons i la transparència. Trieu entre rellotge analògic o digital per adaptar-vos al vostre estil i accedir fàcilment a la informació de temps essencial d'un cop d'ull. + +🎨 INTERFÍCIE I TEMES PERSONALITZABLES: +Gaudiu d'una experiència personalitzada amb el «material design» del Fossify Clock i les opcions de tema fosc. Adapteu l'aplicació a les vostres preferències amb colors i temes personalitzables, potenciant la usabilitat i reduint la tensió ocular, especialment en entorns de poca llum. + +🔒 ENFOCAT A LA PRIVADESA: +Tingueu la seguretat de saber que la vostra privadesa està protegida amb el funcionament fora de línia del Fossify Clock. Experimenteu la privadesa, seguretat i estabilitat màxima sense sacrificar la funcionalitat ni la comoditat. + +🌐 SENSE PUBLICITAT I DE CODI OBERT: +Digueu adeu als anuncis intrusius i als permisos innecessaris. El Fossify Clock és sense anuncis, totalment de codi obert, i us atorga un control complet sobre la vostra experiència de control del temps. + +Actualitzeu les vostres habilitats de gestió del temps, optimitzeu les rutines i prioritzeu millor el son amb el Fossify Clock. Descarregueu-lo ara i preneu el control del vostre temps com mai. + +Exploreu més aplicacions de Fossify: https://www.fossify.org +Codi obert: https://www.github.com/FossifyOrg +Uniu-vos a la comunitat a Reddit: https://www.reddit.com/r/Fossify +Connecteu a Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/ca/short_description.txt b/fastlane/metadata/android/ca/short_description.txt new file mode 100644 index 00000000..e62332ec --- /dev/null +++ b/fastlane/metadata/android/ca/short_description.txt @@ -0,0 +1 @@ +Aplicació de rellotge de codi obert, lleuger i amb característiques essencials. diff --git a/fastlane/metadata/android/ca/title.txt b/fastlane/metadata/android/ca/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/ca/title.txt @@ -0,0 +1 @@ +Fossify Clock From 560c40dffd99cc1538e92724c89b87fed6faa335 Mon Sep 17 00:00:00 2001 From: Argo Carpathians Date: Tue, 26 Mar 2024 22:17:06 +0000 Subject: [PATCH 016/104] Translated using Weblate (Indonesian) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/id/ --- fastlane/metadata/android/id/changelogs/1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/id/changelogs/1.txt diff --git a/fastlane/metadata/android/id/changelogs/1.txt b/fastlane/metadata/android/id/changelogs/1.txt new file mode 100644 index 00000000..5727e141 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/1.txt @@ -0,0 +1 @@ +* Rilis awal. From 3f268a5ce4f38bb70525ebcb78832018d6e4601e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=8E=8B=E5=8F=AB=E6=88=91=E6=9D=A5=E5=B7=A1?= =?UTF-8?q?=E5=B1=B1?= Date: Tue, 26 Mar 2024 08:13:17 +0000 Subject: [PATCH 017/104] Translated using Weblate (Chinese (Simplified)) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hans/ --- fastlane/metadata/android/zh-CN/title.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/zh-CN/title.txt b/fastlane/metadata/android/zh-CN/title.txt index 16fe316b..7bf23adf 100644 --- a/fastlane/metadata/android/zh-CN/title.txt +++ b/fastlane/metadata/android/zh-CN/title.txt @@ -1 +1 @@ -Fossify Clock +Fossify 时钟 From 5aeba8c634515bcce5e7cc9a1651429bd2883046 Mon Sep 17 00:00:00 2001 From: OuHaich Cubensis Date: Wed, 27 Mar 2024 16:56:02 +0000 Subject: [PATCH 018/104] Translated using Weblate (French) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/fr/ --- fastlane/metadata/android/fr-FR/changelogs/1.txt | 1 + fastlane/metadata/android/fr-FR/short_description.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/fr-FR/changelogs/1.txt create mode 100644 fastlane/metadata/android/fr-FR/short_description.txt diff --git a/fastlane/metadata/android/fr-FR/changelogs/1.txt b/fastlane/metadata/android/fr-FR/changelogs/1.txt new file mode 100644 index 00000000..ea921cd5 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/1.txt @@ -0,0 +1 @@ +* Première version. diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt new file mode 100644 index 00000000..239168d9 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -0,0 +1 @@ +Application horloge pratique, légère et open source avec des fonctionnalités essentielles. From 3b3e1e3df963487e27b28f139f82c825ed0ae7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 1 Apr 2024 10:00:53 +0000 Subject: [PATCH 019/104] Translated using Weblate (Estonian) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/et/ --- fastlane/metadata/android/et/changelogs/1.txt | 1 + fastlane/metadata/android/et/short_description.txt | 1 + fastlane/metadata/android/et/title.txt | 1 + 3 files changed, 3 insertions(+) create mode 100644 fastlane/metadata/android/et/changelogs/1.txt create mode 100644 fastlane/metadata/android/et/short_description.txt create mode 100644 fastlane/metadata/android/et/title.txt diff --git a/fastlane/metadata/android/et/changelogs/1.txt b/fastlane/metadata/android/et/changelogs/1.txt new file mode 100644 index 00000000..c717f93a --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/1.txt @@ -0,0 +1 @@ +* Esmane versioon. diff --git a/fastlane/metadata/android/et/short_description.txt b/fastlane/metadata/android/et/short_description.txt new file mode 100644 index 00000000..1b9afad9 --- /dev/null +++ b/fastlane/metadata/android/et/short_description.txt @@ -0,0 +1 @@ +Mugav ja lihtne avatud lähtekoodil põhinev kell, milles on kõik vajalik olemas. diff --git a/fastlane/metadata/android/et/title.txt b/fastlane/metadata/android/et/title.txt new file mode 100644 index 00000000..21b7076c --- /dev/null +++ b/fastlane/metadata/android/et/title.txt @@ -0,0 +1 @@ +Fossify kell From fa9cefae6035ec2e4ba2d79880b90f658f262661 Mon Sep 17 00:00:00 2001 From: GuitarBilly Date: Mon, 8 Apr 2024 21:52:51 +0000 Subject: [PATCH 020/104] Translated using Weblate (Dutch) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 373bfa3e..c5e91e76 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -45,4 +45,6 @@ Volume geleidelijk verhogen Hoe kan ik rondetijden sorteren in de stopwatch? Klik op een van de kolommen om de rondetijden te sorteren op basis van die kolom. Klik nogmaals op dezelfde kolom om de sorteervolgorde om te keren. - + Stopwatch + Aftelklok + \ No newline at end of file From 08fb89f090c7365c0d075a5e39dad732dcdcbbe8 Mon Sep 17 00:00:00 2001 From: Fjuro Date: Mon, 8 Apr 2024 18:34:18 +0000 Subject: [PATCH 021/104] Translated using Weblate (Czech) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/1.txt | 1 + fastlane/metadata/android/cs-CZ/short_description.txt | 1 + fastlane/metadata/android/cs-CZ/title.txt | 1 + 3 files changed, 3 insertions(+) create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/1.txt create mode 100644 fastlane/metadata/android/cs-CZ/short_description.txt create mode 100644 fastlane/metadata/android/cs-CZ/title.txt diff --git a/fastlane/metadata/android/cs-CZ/changelogs/1.txt b/fastlane/metadata/android/cs-CZ/changelogs/1.txt new file mode 100644 index 00000000..b3f5c161 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/1.txt @@ -0,0 +1 @@ +* Prvotní vydání. diff --git a/fastlane/metadata/android/cs-CZ/short_description.txt b/fastlane/metadata/android/cs-CZ/short_description.txt new file mode 100644 index 00000000..5666f1df --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/short_description.txt @@ -0,0 +1 @@ +Praktická aplikace hodin s otevřeným zdrojovým kódem a základními funkcemi. diff --git a/fastlane/metadata/android/cs-CZ/title.txt b/fastlane/metadata/android/cs-CZ/title.txt new file mode 100644 index 00000000..b776b839 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/title.txt @@ -0,0 +1 @@ +Hodiny Fossify From bf7c948163ff965bfd5f73e22a8f7de5bd5316e8 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 11 Apr 2024 12:18:24 +0000 Subject: [PATCH 022/104] Translated using Weblate (Dutch) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/nl/ --- fastlane/metadata/android/nl-NL/short_description.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/nl-NL/short_description.txt diff --git a/fastlane/metadata/android/nl-NL/short_description.txt b/fastlane/metadata/android/nl-NL/short_description.txt new file mode 100644 index 00000000..cb974679 --- /dev/null +++ b/fastlane/metadata/android/nl-NL/short_description.txt @@ -0,0 +1 @@ +Handige, lichtgewicht, open-source klok-app met alle essentiële functies. From 1bddcb0528b8e06e626746cfb7a55ef5f20ff406 Mon Sep 17 00:00:00 2001 From: lucasmz Date: Fri, 12 Apr 2024 23:58:31 +0000 Subject: [PATCH 023/104] Translated using Weblate (Portuguese (Brazil)) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/pt_BR/ --- .../metadata/android/pt-BR/changelogs/1.txt | 1 + .../android/pt-BR/full_description.txt | 32 +++++++++++++++++++ .../android/pt-BR/short_description.txt | 1 + fastlane/metadata/android/pt-BR/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/pt-BR/changelogs/1.txt create mode 100644 fastlane/metadata/android/pt-BR/full_description.txt create mode 100644 fastlane/metadata/android/pt-BR/short_description.txt create mode 100644 fastlane/metadata/android/pt-BR/title.txt diff --git a/fastlane/metadata/android/pt-BR/changelogs/1.txt b/fastlane/metadata/android/pt-BR/changelogs/1.txt new file mode 100644 index 00000000..01644058 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/1.txt @@ -0,0 +1 @@ +* Lançamento inicial. diff --git a/fastlane/metadata/android/pt-BR/full_description.txt b/fastlane/metadata/android/pt-BR/full_description.txt new file mode 100644 index 00000000..db6878e7 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/full_description.txt @@ -0,0 +1,32 @@ +Introducindo o Relógio Fossify - o companheiro definito para gerencimento de tempo, para melhorar suas rotinas diárias e motivar hábitos de sono melhores. Com uma multitude de funções feitas com suas necessidades em mente, o Relógio Fossify integra diretamente à sua vida, oferecendo conveniência e versatilidade excepcionais. + +⌚ MULTIFUNCTIONAL TIMEKEEPING: +Experience the power of versatile time management with Fossify Clock. From serving as a clock widget to functioning as an alarm clock and stopwatch, this app is your go-to tool for regulating your daily activities and improving your overall lifestyle. + +⏰ FEATURE-RICH ALARM: +Wake up refreshed with Fossify Clock's comprehensive alarm features. Set multiple alarms with options like day selection, vibration toggle, custom labels and ringtone customization. Enjoy gradual volume increase and a customizable snooze button for a pleasant waking experience. With a user-friendly interface, setting up alarms has never been easier. + +⏱️ CONVENIENT STOPWATCH: +Track your activities with precision using Fossify Clock's stopwatch function. Measure longer periods or individual laps effortlessly. You can also sort your laps in ascending or descending order. + +⏳ PRECISE TIMER FUNCTIONALITY: +Stay on top of your tasks with Fossify Clock's versatile timer feature. Customize ringtone preferences, toggle vibrations, and pause countdowns to suit your needs. Whether you're timing cooking intervals, managing study sessions, or ensuring timely breaks, Fossify Clock has you covered with precision and ease. + +🌈 CLOCK WIDGET WITH CUSTOMIZABLE FEATURES: +Transform your home screen with Fossify Clock's customizable clock widget. Adjust text color, background color, and transparency. Choose between analog or digital clock to suit your style and easily access essential time information at a glance. + +🎨 CUSTOMIZABLE INTERFACE AND THEMES: +Enjoy a personalized experience with Fossify Clock's material design and dark theme options. Tailor the app to your preferences with customizable colors and themes, enhancing usability and reducing eye strain, especially in low-light environments. + +🔒 PRIVACY-FIRST APPROACH: +Rest assured knowing your privacy is protected with Fossify Clock's offline operation. Experience maximum privacy, security, and stability without sacrificing functionality or convenience. + +🌐 AD-FREE & OPEN-SOURCE: +Say goodbye to intrusive ads and unnecessary permissions. Fossify Clock is ad-free, fully open-source, and grants you complete control over your timekeeping experience. + +Upgrade your time management skills, optimize your routines, and prioritize better sleep with Fossify Clock. Download now and take control of your time like never before. + +Explore more Fossify apps: https://www.fossify.org +Open-Source Code: https://www.github.com/FossifyOrg +Join the community on Reddit: https://www.reddit.com/r/Fossify +Connect on Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/pt-BR/short_description.txt b/fastlane/metadata/android/pt-BR/short_description.txt new file mode 100644 index 00000000..86b90732 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/short_description.txt @@ -0,0 +1 @@ +Um app de relógio de código aberto, útil, leve e com funções essenciais. diff --git a/fastlane/metadata/android/pt-BR/title.txt b/fastlane/metadata/android/pt-BR/title.txt new file mode 100644 index 00000000..6e25b0b8 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/title.txt @@ -0,0 +1 @@ +Relógio Fossify From eded923f5ed37274e70d2d7c9d2b5162f91d166f Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Mon, 22 Apr 2024 09:59:09 +0300 Subject: [PATCH 024/104] fixed doublicate alarms and replacing timers when importing --- .../org/fossify/clock/helpers/DataImporter.kt | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt index 4ae87958..cf68ac76 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt @@ -54,13 +54,16 @@ class DataImporter( private fun insertAlarmsFromJSON(jsonArray: JSONArray): Int { + val existingAlarms = dbHelper.getAlarms() var insertedCount = 0 for (i in 0 until jsonArray.length()) { val jsonObject = jsonArray.getJSONObject(i) if (Alarm.parseFromJSON(jsonObject) != null) { val alarm = Alarm.parseFromJSON(jsonObject) as Alarm - if (dbHelper.insertAlarm(alarm) != -1) { - insertedCount++ + if (!isAlarmAlreadyInserted(alarm, existingAlarms)) { + if (dbHelper.insertAlarm(alarm) != -1) { + insertedCount++ + } } } } @@ -73,14 +76,50 @@ class DataImporter( val jsonObject = jsonArray.getJSONObject(i) if (Timer.parseFromJSON(jsonObject) != null) { val timer = Timer.parseFromJSON(jsonObject) as Timer - timerHelper.insertOrUpdateTimer(timer) { id -> - if (id != -1L) { - insertedCount++ + timerHelper.getTimers { existingTimers -> + timer.id = existingTimers.last().id?.plus(1) + if (!isTimerAlreadyInserted(timer, existingTimers)) { + timerHelper.insertOrUpdateTimer(timer) { id -> + if (id != -1L) { + insertedCount++ + } + } } } } } return insertedCount } + + private fun isAlarmAlreadyInserted(alarm: Alarm, existingAlarms: List): Boolean { + for (existingAlarm in existingAlarms) { + if (alarm.timeInMinutes == existingAlarm.timeInMinutes && + alarm.days == existingAlarm.days && + alarm.vibrate == existingAlarm.vibrate && + alarm.soundTitle == existingAlarm.soundTitle && + alarm.soundUri == existingAlarm.soundUri && + alarm.label == existingAlarm.label && + alarm.oneShot == existingAlarm.oneShot + ) { + return true + } + } + return false + } + + private fun isTimerAlreadyInserted(timer: Timer, existingTimers: List): Boolean { + for (existingTimer in existingTimers) { + if (timer.seconds == existingTimer.seconds && + timer.vibrate == existingTimer.vibrate && + timer.soundUri == existingTimer.soundUri && + timer.soundTitle == existingTimer.soundTitle && + timer.label == existingTimer.label && + timer.createdAt == existingTimer.createdAt + ) { + return true + } + } + return false + } } From 6793f55c3b8222190ea67c9fac0d0456a7227282 Mon Sep 17 00:00:00 2001 From: Salif Mehmed Date: Tue, 23 Apr 2024 10:34:33 +0000 Subject: [PATCH 025/104] Translated using Weblate (Bulgarian) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/bg/ --- fastlane/metadata/android/bg/title.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/bg/title.txt diff --git a/fastlane/metadata/android/bg/title.txt b/fastlane/metadata/android/bg/title.txt new file mode 100644 index 00000000..1a90cff7 --- /dev/null +++ b/fastlane/metadata/android/bg/title.txt @@ -0,0 +1 @@ +Фосифай Часовник From f66488ed2a870289db0b435574eb53f7baa03e00 Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Mon, 29 Apr 2024 10:41:01 +0300 Subject: [PATCH 026/104] fixed timers not importing when list of timers is empty --- .../main/kotlin/org/fossify/clock/helpers/DataImporter.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt index cf68ac76..5fc67065 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt @@ -77,7 +77,11 @@ class DataImporter( if (Timer.parseFromJSON(jsonObject) != null) { val timer = Timer.parseFromJSON(jsonObject) as Timer timerHelper.getTimers { existingTimers -> - timer.id = existingTimers.last().id?.plus(1) + timer.id = if (existingTimers.isNotEmpty()) { + existingTimers.last().id?.plus(1) + } else { + 1 + } if (!isTimerAlreadyInserted(timer, existingTimers)) { timerHelper.insertOrUpdateTimer(timer) { id -> if (id != -1L) { From 8c08994bba7d15e85f154dbc13b000e77ae588ea Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Mon, 29 Apr 2024 11:22:55 +0300 Subject: [PATCH 027/104] fixed code formatting --- .../kotlin/org/fossify/clock/activities/SettingsActivity.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 5b7334f1..dca09753 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -240,7 +240,6 @@ class SettingsActivity : SimpleActivity() { putExtra(Intent.EXTRA_TITLE, file.name) addCategory(Intent.CATEGORY_OPENABLE) - try { exportActivityResultLauncher.launch(file.name) } catch (e: ActivityNotFoundException) { @@ -248,8 +247,6 @@ class SettingsActivity : SimpleActivity() { } catch (e: Exception) { showErrorToast(e) } - - } } } else { From 4c67e2b26c3bd082e7e5d6e8e79e070917726f83 Mon Sep 17 00:00:00 2001 From: ronniedroid Date: Mon, 29 Apr 2024 12:14:09 +0300 Subject: [PATCH 028/104] changed toast messages for importing --- .../fossify/clock/activities/SettingsActivity.kt | 5 +---- .../org/fossify/clock/helpers/DataImporter.kt | 14 +++----------- app/src/main/res/values/strings.xml | 2 -- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index dca09753..c8eadc81 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -20,7 +20,6 @@ import java.io.FileOutputStream import java.io.OutputStream import java.util.Locale import kotlin.system.exitProcess -import org.fossify.clock.R as CR class SettingsActivity : SimpleActivity() { private val binding: ActivitySettingsBinding by viewBinding(ActivitySettingsBinding::inflate) @@ -323,9 +322,7 @@ class SettingsActivity : SimpleActivity() { DataImporter.ImportResult.IMPORT_OK -> R.string.importing_successful - DataImporter.ImportResult.IMPORT_INCOMPLETE -> R.string.importing_some_entries_failed - DataImporter.ImportResult.ALARMS_IMPORT_FAIL -> CR.string.alarms_import_failed - DataImporter.ImportResult.TIMERS_IMPORT_FAIL -> CR.string.timers_import_failed + DataImporter.ImportResult.IMPORT_INCOMPLETE -> R.string.no_new_entries_for_importing DataImporter.ImportResult.IMPORT_FAIL -> R.string.no_items_found } ) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt index 5fc67065..fdb25491 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt @@ -16,8 +16,6 @@ class DataImporter( enum class ImportResult { IMPORT_INCOMPLETE, - ALARMS_IMPORT_FAIL, - TIMERS_IMPORT_FAIL, IMPORT_FAIL, IMPORT_OK } @@ -34,15 +32,9 @@ class DataImporter( val importedTimers = insertTimersFromJSON(timersFromJson) if (importedAlarms > 0 || importedTimers > 0) { - if (importedAlarms < alarmsFromJson.length() || importedTimers < timersFromJson.length()) { - ImportResult.IMPORT_INCOMPLETE - } else { - ImportResult.IMPORT_OK - } - } else if (importedAlarms == 0) { - ImportResult.ALARMS_IMPORT_FAIL - } else if (importedTimers == 0) { - ImportResult.TIMERS_IMPORT_FAIL + ImportResult.IMPORT_OK + } else if (importedAlarms == 0 && importedTimers == 0) { + ImportResult.IMPORT_INCOMPLETE } else { ImportResult.IMPORT_FAIL } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c6fc3b41..5df0ed1b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -52,8 +52,6 @@ Increase volume gradually Import alarms and timers Export alarms and timers - Importing alarms failed - Importing timers failed How can I change lap sorting at the stopwatch tab? From 6d739d3ea82ad1f8c8c54087b62ea2644be641bf Mon Sep 17 00:00:00 2001 From: Jeroen Date: Wed, 8 May 2024 21:33:55 +0000 Subject: [PATCH 029/104] Translated using Weblate (Dutch) Currently translated at 97.7% (43 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index c5e91e76..54e2ec17 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,7 +5,7 @@ Trillen Geen dagen geselecteerd Klok - Stopwatch starten + Start stopwatch Ronde Stopwatch is gestopt Timer is gestopt @@ -37,12 +37,12 @@ %d timer loopt %d timers lopen - Tab Klok - Tab Wekker - Tab Stopwatch - Tab Timers - Seconden tonen - Volume geleidelijk verhogen + Klok tabblad + Wekker tabblad + Stopwatch tabblad + Timers tabblad + Toon seconden + Verhoog volume geleidelijk Hoe kan ik rondetijden sorteren in de stopwatch? Klik op een van de kolommen om de rondetijden te sorteren op basis van die kolom. Klik nogmaals op dezelfde kolom om de sorteervolgorde om te keren. Stopwatch From 899c4ba497a646af7bf5d4ca8748e2513ab3db9e Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 9 May 2024 01:56:26 +0000 Subject: [PATCH 030/104] Translated using Weblate (Dutch) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 54e2ec17..cbc5fbc6 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,7 +5,7 @@ Trillen Geen dagen geselecteerd Klok - Start stopwatch + Stopwatch starten Ronde Stopwatch is gestopt Timer is gestopt @@ -37,12 +37,12 @@ %d timer loopt %d timers lopen - Klok tabblad - Wekker tabblad - Stopwatch tabblad - Timers tabblad - Toon seconden - Verhoog volume geleidelijk + Tabblad Klok + Tabblad Wekker + Tabblad Stopwatch + Tabblad Timers + Seconden tonen + Volume geleidelijk verhogen Hoe kan ik rondetijden sorteren in de stopwatch? Klik op een van de kolommen om de rondetijden te sorteren op basis van die kolom. Klik nogmaals op dezelfde kolom om de sorteervolgorde om te keren. Stopwatch From ac4f3acbd1db3c4e91dc121e12d52510a03d08bc Mon Sep 17 00:00:00 2001 From: Jeroen Date: Fri, 10 May 2024 07:47:04 +0000 Subject: [PATCH 031/104] Translated using Weblate (Dutch) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 46 +++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index cbc5fbc6..c2de5dca 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,46 +5,46 @@ Trillen Geen dagen geselecteerd Klok - Stopwatch starten + Start stopwatch Ronde Stopwatch is gestopt Timer is gestopt - Max duur van herinnering + Max herinneringsduur Tijd verstreken Klok en datum - Tekstschaduw gebruiken + Gebruik tekstschaduw Veeg naar rechts voor uitzetten, of naar links voor uitstellen. Aanmaakvolgorde - Wektijd - Dag en tijd + Wekker tijd + Dag en wekker tijd Analoge klok Digitale klok Wekker uitgezet - Timer uitzetten - Wekker uitzetten + Selecteer timer om uit te zetten + Selecteer wekker om uit te zetten Wekker ingesteld Wekker uitgesteld met %s - Geen wekkers - Wekker toevoegen - Geen timers - Timer toevoegen + Geen wekkers gevonden + Voeg wekker toe + Geen timers gevonden + Voeg timer toe Volgende wekker Wekker vroegtijdig uitzetten - Timers lopen - Timer voor %s loopt - Nieuwe Timer + Timers actief + Timer voor %s actief + Nieuwe timer - %d timer loopt - %d timers lopen + %d timer actief + %d timers actief - Tabblad Klok - Tabblad Wekker - Tabblad Stopwatch - Tabblad Timers - Seconden tonen - Volume geleidelijk verhogen + Tabblad klok + Tabblad wekker + Tabblad stopwatch + Tabblad timer + Toon seconden + Verhoog volume geleidelijk Hoe kan ik rondetijden sorteren in de stopwatch? Klik op een van de kolommen om de rondetijden te sorteren op basis van die kolom. Klik nogmaals op dezelfde kolom om de sorteervolgorde om te keren. Stopwatch - Aftelklok + Timer \ No newline at end of file From a93e6de19e165f50cd9c9813ea761e30398edee7 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Sun, 12 May 2024 12:20:18 +0000 Subject: [PATCH 032/104] Translated using Weblate (Dutch) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index c2de5dca..42c6262a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,18 +5,18 @@ Trillen Geen dagen geselecteerd Klok - Start stopwatch + Stopwatch starten Ronde Stopwatch is gestopt Timer is gestopt - Max herinneringsduur + Maximale herinneringsduur Tijd verstreken Klok en datum - Gebruik tekstschaduw + Tekstschaduw gebruiken Veeg naar rechts voor uitzetten, of naar links voor uitstellen. Aanmaakvolgorde - Wekker tijd - Dag en wekker tijd + Wektijd + Dag en tijd Analoge klok Digitale klok Wekker uitgezet @@ -25,9 +25,9 @@ Wekker ingesteld Wekker uitgesteld met %s Geen wekkers gevonden - Voeg wekker toe + Wekker toevoegen Geen timers gevonden - Voeg timer toe + Timer toevoegen Volgende wekker Wekker vroegtijdig uitzetten Timers actief @@ -41,8 +41,8 @@ Tabblad wekker Tabblad stopwatch Tabblad timer - Toon seconden - Verhoog volume geleidelijk + Seconden tonen + Volume geleidelijk verhogen Hoe kan ik rondetijden sorteren in de stopwatch? Klik op een van de kolommen om de rondetijden te sorteren op basis van die kolom. Klik nogmaals op dezelfde kolom om de sorteervolgorde om te keren. Stopwatch From 1cf4f66ff9f0de2f038f103a4e1060516cd31dcd Mon Sep 17 00:00:00 2001 From: Umut Solmz Date: Mon, 13 May 2024 13:42:15 +0000 Subject: [PATCH 033/104] Translated using Weblate (Turkish) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/tr/ --- .../metadata/android/tr-TR/changelogs/1.txt | 1 + .../android/tr-TR/full_description.txt | 36 +++++++++++++++++++ .../android/tr-TR/short_description.txt | 1 + fastlane/metadata/android/tr-TR/title.txt | 1 + 4 files changed, 39 insertions(+) create mode 100644 fastlane/metadata/android/tr-TR/changelogs/1.txt create mode 100644 fastlane/metadata/android/tr-TR/full_description.txt create mode 100644 fastlane/metadata/android/tr-TR/short_description.txt create mode 100644 fastlane/metadata/android/tr-TR/title.txt diff --git a/fastlane/metadata/android/tr-TR/changelogs/1.txt b/fastlane/metadata/android/tr-TR/changelogs/1.txt new file mode 100644 index 00000000..5ed2f491 --- /dev/null +++ b/fastlane/metadata/android/tr-TR/changelogs/1.txt @@ -0,0 +1 @@ +* İlk sürüm. diff --git a/fastlane/metadata/android/tr-TR/full_description.txt b/fastlane/metadata/android/tr-TR/full_description.txt new file mode 100644 index 00000000..907617b7 --- /dev/null +++ b/fastlane/metadata/android/tr-TR/full_description.txt @@ -0,0 +1,36 @@ +Fossify Clock ile tanışın - günlük rutinlerinizi geliştirmek ve daha iyi uyku alışkanlıklarını teşvik etmek için tasarlanmış nihai zaman tutma arkadaşı. İhtiyaçlarınıza göre uyarlanmış çok sayıda işlevle Fossify Saat, benzersiz bir rahatlık ve çok yönlülük sunarak hayatınıza sorunsuz bir şekilde entegre olur. + +⌚ ÇOK İŞLEVLİ ZAMAN YÖNETİMİ: +Fossify Saat ile çok yönlü zaman yönetiminin gücünü deneyimleyin. Bir saat bileşeni olarak hizmet vermekten çalar saat ve kronometre olarak işlev görmeye kadar, bu uygulama günlük aktivitelerinizi düzenlemek ve genel yaşam tarzınızı iyileştirmek için başvuracağınız iyi bir araç. + +⏰ ZENGİN ÖZELLİKLİ ALARM: +Fossify Saat’in kapsamlı alarm özellikleriyle tazelenmiş olarak uyanın. Gün seçimi, titreşim geçişi, özel etiketler ve zil sesi özelleştirme gibi seçeneklerle birden fazla alarm kurun. Keyifli bir uyanma deneyimi için kademeli ses artışının ve özelleştirilebilir bir erteleme düğmesinin keyfini çıkarın. Kullanıcı dostu bir arayüz ile alarm kurmak hiç bu kadar kolay olmamıştı. + +⏱️ KULLANIŞLI KRONOMETRE: +Fossify Saat’in kronometre fonksiyonunu kullanarak aktivitelerinizi hassas bir şekilde takip edin. Uzun süreleri veya bireysel turları zahmetsizce ölçün. Ayrıca turlarınızı artan veya azalan sırada sıralayabilirsiniz. + +⏳ HASSAS ZAMANLAYICI İŞLEVİ: +Fossify Saat’in çok yönlü zamanlayıcı özelliği ile görevlerinizin başında kalın. Zil sesi tercihlerini özelleştirin, titreşimleri değiştirin ve geri sayımları ihtiyaçlarınıza göre duraklatın. İster yemek pişirme aralıklarını zamanlıyor, ister çalışma seanslarını yönetiyor veya zamanında mola veriyor olun, Fossify Saat size hassasiyet ve kolaylık sağlar. + +🌈 ÖZELLEŞTİRİLEBİLİR ÖZELLİKLERE SAHİP BİR SAAT BİLEŞENİ: +Fossify Saat’in özelleştirilebilir saat bileşeni ile ana ekranınızı dönüştürün. Metin rengini, arka plan rengini ve şeffaflığı ayarlayın. Tarzınıza uygun analog veya dijital saat arasında seçim yapın ve bir bakışta önemli zaman bilgilerine kolayca erişin. + +🎨 ÖZELLEŞTİRİLEBİLİR ARAYÜZ VE TEMALAR: +Fossify Saat’in materyal tasarımı ve koyu tema seçenekleriyle kişiselleştirilmiş bir deneyimin keyfini çıkarın. Özelleştirilebilir renkler ve temalarla uygulamayı tercihlerinize göre uyarlayın, kullanılabilirliği artırın ve özellikle düşük ışıklı ortamlarda göz yorgunluğunu azaltın. + +🔒 GİZLİLİK ÖNCELİKLİ YAKLAŞIM: +Fossify Saat’in çevrimdışı çalışmasıyla gizliliğinizin korunduğunu bilerek içiniz rahat olsun. İşlevsellik veya rahatlıktan ödün vermeden maksimum gizlilik, güvenlik ve kararlılığı yaşayın. + +🌐 REKLAMSIZ VE AÇIK KAYNAK: +Müdahaleci reklamlara ve gereksiz izinlere elveda deyin. Fossify Saat reklamsızdır, tamamen açık kaynaklıdır ve zaman tutma deneyiminiz üzerinde size tam kontrol sağlar. + +Fossify Saat ile zaman yönetimi becerilerinizi geliştirin, rutinlerinizi optimize edin ve daha iyi uykuya öncelik verin. Hemen indirin ve zamanınızın kontrolünü daha önce hiç olmadığı gibi elinize alın. + +Daha fazla Fossify uygulaması keşfedin: +https://www.fossify.org +Açık Kaynak Kod: +https://www.github.com/FossifyOrg +Reddit'te topluluğa katılın: +https://www.reddit.com/r/Fossify +Telegram üzerinden bağlanın: +https://t.me/Fossify diff --git a/fastlane/metadata/android/tr-TR/short_description.txt b/fastlane/metadata/android/tr-TR/short_description.txt new file mode 100644 index 00000000..9d186a52 --- /dev/null +++ b/fastlane/metadata/android/tr-TR/short_description.txt @@ -0,0 +1 @@ +Temel özelliklere sahip kullanışlı, hafif, açık kaynaklı saat uygulaması. diff --git a/fastlane/metadata/android/tr-TR/title.txt b/fastlane/metadata/android/tr-TR/title.txt new file mode 100644 index 00000000..4f20c44d --- /dev/null +++ b/fastlane/metadata/android/tr-TR/title.txt @@ -0,0 +1 @@ +Fossify Saat From a956838422277cb06648776ab9c45e133331343d Mon Sep 17 00:00:00 2001 From: Hans Henrik Juhl Date: Mon, 20 May 2024 11:20:51 +0000 Subject: [PATCH 034/104] Translated using Weblate (Danish) Currently translated at 50.0% (22 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/da/ --- app/src/main/res/values-da/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 75cf899e..9b1886ee 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -18,4 +18,8 @@ Vis sekunder Hvordan kan jeg ændre sortering af mellemtider i stopuret? Klik på den kolonne der skal sorteres efter. Med flere klik kan du skifte mellem stigende og faldende rækkefølge. - + Ur + Start stopur + Klokketslet og dato + Stopur + \ No newline at end of file From 2d7d1b2333854711c9f0cf713abb48a787747eef Mon Sep 17 00:00:00 2001 From: VfBFan Date: Tue, 21 May 2024 09:39:33 +0000 Subject: [PATCH 035/104] Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/de/ --- fastlane/metadata/android/de-DE/full_description.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlane/metadata/android/de-DE/full_description.txt b/fastlane/metadata/android/de-DE/full_description.txt index 98b9e390..e4e8bf98 100644 --- a/fastlane/metadata/android/de-DE/full_description.txt +++ b/fastlane/metadata/android/de-DE/full_description.txt @@ -4,7 +4,7 @@ Fossify Clock ist der ultimative Begleiter für die Zeitmessung, der deine tägl Erlebe die Macht des vielseitigen Zeitmanagements mit Fossify Clock. Ob als Uhren-Widget, Wecker oder Stoppuhr – mit dieser App kannst du deine täglichen Aktivitäten regulieren und deinen Lebensstil verbessern. ⏰ FUNKTIONSREICHER ALARM: -Mit den umfassenden Alarmfunktionen von Fossify Clock wachst du erfrischt auf. Stelle mehrere Alarme mit Optionen wie Tagesauswahl, Vibration, benutzerdefinierte Beschriftung und Klingeltonanpassung ein. Genieße die schrittweise Erhöhung der Lautstärke und eine anpassbare Schlummertaste für ein angenehmes Aufwachen. Dank der benutzerfreundlichen Oberfläche war es noch nie so einfach, Alarme einzurichten. +Mit den umfassenden Alarmfunktionen von Fossify Clock wachst du erfrischt auf. Stelle mehrere Alarme mit Optionen wie Tagesauswahl, Vibration, benutzerdefinierte Beschriftung und Klingeltonanpassung ein. Genieße die schrittweise Erhöhung der Lautstärke und eine anpassbare Schlummertaste für ein angenehmes Aufwachen. Dank der bedienfreundlichen Oberfläche war es noch nie so einfach, Alarme einzurichten. ⏱️ PRAKTISCHE STOPPUHR: Mit der Stoppuhrfunktion von Fossify Clock kannst du deine Aktivitäten genau verfolgen. Messe mühelos längere Zeiträume oder einzelne Runden. Du kannst deine Runden auch in aufsteigender oder absteigender Reihenfolge sortieren. @@ -16,7 +16,7 @@ Mit der vielseitigen Timer-Funktion von Fossify Clock behältst du den Überblic Verändere deinen Startbildschirm mit dem anpassbaren Uhren-Widget von Fossify Clock. Passe Textfarbe, Hintergrundfarbe und Transparenz an. Wähle zwischen analoger oder digitaler Uhr, um deinen Stil zu unterstreichen und die wichtigsten Zeitinformationen auf einen Blick zu sehen. 🎨 ANPASSBARE OBERFLÄCHE UND FARBSCHEMAS: -Genieße ein individuelles Erlebnis mit dem Material Design und den dunklen Farbschemas von Fossify Clock. Passe die App mit anpassbaren Farben und Farbschemas an deine Vorlieben an, um die Benutzerfreundlichkeit zu verbessern und die Augen zu entlasten, besonders in schwach beleuchteten Umgebungen. +Genieße ein individuelles Erlebnis mit dem Material Design und den dunklen Farbschemas von Fossify Clock. Passe die App mit anpassbaren Farben und Farbschemas an deine Vorlieben an, um die Bedienfreundlichkeit zu verbessern und die Augen zu entlasten, besonders in schwach beleuchteten Umgebungen. 🔒 PRIVATSPHÄRE STEHT AN ERSTER STELLE: Du kannst sicher sein, dass deine Privatsphäre durch den Offline-Betrieb von Fossify Clock geschützt ist. Erlebe ein Maximum an Privatsphäre, Sicherheit und Stabilität, ohne auf Funktionalität oder Komfort verzichten zu müssen. From d5d2f654b89dc516e295c86c865538a1e9ae69f9 Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 21 May 2024 21:28:18 +0000 Subject: [PATCH 036/104] Translated using Weblate (Ukrainian) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/uk/ --- fastlane/metadata/android/uk/changelogs/1.txt | 1 + .../metadata/android/uk/full_description.txt | 32 +++++++++++++++++++ .../metadata/android/uk/short_description.txt | 1 + fastlane/metadata/android/uk/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/uk/changelogs/1.txt create mode 100644 fastlane/metadata/android/uk/full_description.txt create mode 100644 fastlane/metadata/android/uk/short_description.txt create mode 100644 fastlane/metadata/android/uk/title.txt diff --git a/fastlane/metadata/android/uk/changelogs/1.txt b/fastlane/metadata/android/uk/changelogs/1.txt new file mode 100644 index 00000000..8ae0c5b0 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/1.txt @@ -0,0 +1 @@ +* Початковий реліз. diff --git a/fastlane/metadata/android/uk/full_description.txt b/fastlane/metadata/android/uk/full_description.txt new file mode 100644 index 00000000..c0eb1b3c --- /dev/null +++ b/fastlane/metadata/android/uk/full_description.txt @@ -0,0 +1,32 @@ +Представляємо вам Fossify Годинник — ідеальний компаньйон для обліку часу, розроблений для покращення ваших щоденних рутинних справ та сприяння кращому сну. Завдяки безлічі функцій, пристосованих до ваших потреб, Fossify Годинник легко інтегрується у ваше життя, пропонуючи неперевершену зручність та універсальність. + +⌚БАГАТОФУНКЦІОНАЛЬНИЙ ОБЛІК: +Відчуйте силу багатофункціонального обліку часом з Fossify Годинник. Від віджету годинника до будильника та секундоміра — цей застосунок стане вашим незамінним помічником у регулюванні повсякденної діяльності та покращенні загального стилю життя. + +⏰ БАГАТОФУНКЦІОНАЛЬНИЙ БУДИЛЬНИК: +Прокидайтеся бадьорими завдяки широким можливостям будильника Fossify Годинник. Встановлюйте кілька будильників з такими параметрами, як вибір дня, перемикання вібрації, власні мітки та налаштування мелодії. Насолоджуйтесь поступовим збільшенням гучності та налаштовуваною кнопкою повтору для приємного пробудження. Завдяки зручному інтерфейсу налаштувати будильник ще ніколи не було так просто. + +⏱️ ЗРУЧНИЙ СЕКУНДОМІР: +Точно відстежуйте свою активність за допомогою функції секундоміра у Fossify Годинник. Вимірюйте довші періоди або окремі кола без особливих зусиль. Ви також можете сортувати свої кола в порядку зростання або спадання. + +⏳ ТОЧНА ФУНКЦІЯ ТАЙМЕРА: +Залишайтеся на вершині своїх завдань з універсальною функцією таймера Fossify Годинник. Налаштуйте налаштування мелодії дзвінка, перемикайте вібрацію та призупиняйте зворотний відлік відповідно до ваших потреб. Незалежно від того, чи ви встановлюєте час для приготування їжі, чи керуєте навчальними сесіями, чи забезпечуєте своєчасні перерви, Fossify Годинник забезпечить вас усім необхідним. + +🌈 ВІДЖЕТ ГОДИННИКА З ФУНКЦІЯМИ, ЩО НАЛАШТОВУЮТЬСЯ: +Перетворіть свій домашній екран за допомогою налаштовуваного віджету з Fossify Годинник. Налаштуйте колір тексту, фону та прозорість. Обирайте аналоговий або цифровий годинник відповідно до вашого стилю та легко отримуйте доступ до важливої інформації про час з першого погляду. + +🎨 ІНТЕРФЕЙС ТА ТЕМИ, ЩО НАЛАШТОВУЮТЬСЯ: +Насолоджуйтесь персоналізованим інтерфейсом Fossify Годинник з матеріальним дизайном та темними темами. Налаштуйте застосунок відповідно до своїх уподобань за допомогою кольорів та тем, що налаштовуються, покращуючи зручність використання та зменшуючи навантаження на очі, особливо в умовах низької освітленості. + +🔒 ПІДХІД, ОРІЄНТОВАНИЙ НА ПРИВАТНІСТЬ: +Будьте впевнені, знаючи, що ваша приватність захищена завдяки роботі Fossify Годинник в режимі автономному режимі. Відчуйте максимальну приватність, безпеку та стабільність без шкоди для функціональності та зручності. + +🌐 БЕЗ РЕКЛАМИ ТА З ВІДКРИТИМ ВИХІДНИМ КОДОМ: +Попрощайтеся з нав'язливою рекламою та непотрібними дозволами. Fossify Годинник не містить реклами, має повністю відкритий вихідний код і надає вам повний контроль над вашим часом. + +Вдосконалюйте свої навички тайм-менеджменту, оптимізуйте свої рутини та визначайте пріоритети для кращого сну з Fossify Годинник. Завантажуйте зараз і контролюйте свій час, як ніколи раніше. + +Дізнайтеся більше про застосунки Fossify: https://www.fossify.org +Відкритий код: https://www.github.com/FossifyOrg +Приєднуйтесь до спільноти на Reddit: https://www.reddit.com/r/Fossify +Приєднуйтесь в Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/uk/short_description.txt b/fastlane/metadata/android/uk/short_description.txt new file mode 100644 index 00000000..2b2b34bf --- /dev/null +++ b/fastlane/metadata/android/uk/short_description.txt @@ -0,0 +1 @@ +Зручний, легкий, з відкритим кодом застосунок годинника з важливими функціями. diff --git a/fastlane/metadata/android/uk/title.txt b/fastlane/metadata/android/uk/title.txt new file mode 100644 index 00000000..c4090529 --- /dev/null +++ b/fastlane/metadata/android/uk/title.txt @@ -0,0 +1 @@ +Fossify Годинник From f83e1e24826bf00eab74d45e027283d9b6031064 Mon Sep 17 00:00:00 2001 From: VKing9 Date: Thu, 6 Jun 2024 12:11:35 +0000 Subject: [PATCH 037/104] Translated using Weblate (Hindi (Hinglish)) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/hi@hinglish/ --- fastlane/metadata/android/hi@hinglish/title.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/hi@hinglish/title.txt diff --git a/fastlane/metadata/android/hi@hinglish/title.txt b/fastlane/metadata/android/hi@hinglish/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/hi@hinglish/title.txt @@ -0,0 +1 @@ +Fossify Clock From 25bb2c13c573321d8acd5f927d7eab7660428660 Mon Sep 17 00:00:00 2001 From: Fjuro Date: Tue, 11 Jun 2024 08:34:48 +0000 Subject: [PATCH 038/104] Translated using Weblate (Czech) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/cs/ --- .../android/cs-CZ/full_description.txt | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 fastlane/metadata/android/cs-CZ/full_description.txt diff --git a/fastlane/metadata/android/cs-CZ/full_description.txt b/fastlane/metadata/android/cs-CZ/full_description.txt new file mode 100644 index 00000000..f356c8b5 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/full_description.txt @@ -0,0 +1,32 @@ +Představujeme Hodiny Fossify – ultimátní nástroj na sledování času navržený pro vylepšení vašich každodenních rutin a pomohl vám s lepším spánkem. Hodiny Fossify obsahují velké množství funkcí přímo pro vaše potřeby, takže se bezproblémově integrují do vašeho života a poskytují bezkonkurenční pohodlí a všestrannost. + +⌚ MULTIFUKNČNÍ ČASOMÍRA: +Vyzkoušejte sílu všestranné správy času pomocí aplikace Hodiny Fossify. Tato aplikace slouží jako widget hodin, budík i stopky a je vaším nástrojem pro regulaci každodenních činností a zlepšení celkového životního stylu. + +⏰ BUDÍK BOHATÝ NA FUNKCE: +Díky rozsáhlým funkcím budíku v aplikaci Hodiny Fossify se můžete probouzet svěží. Nastavte si více budíků s možnostmi, jako je výběr dne, přepínání vibrací, vlastní štítky a přizpůsobení vyzvánění. Vychutnejte si postupné zvyšování hlasitosti a přizpůsobitelné tlačítko odložení budíku pro příjemné probuzení. Díky přívětivému uživatelskému rozhraní nebylo nastavování budíků nikdy jednodušší. + +⏱️ PRAKTICKÉ STOPKY: +Aplikace Hodiny Fossify umožňuje přesné sledování vašich aktivit pomocí funkce stopek. Bez námahy změříte delší časové úseky nebo jednotlivá kola. Své okruhy můžete také seřadit vzestupně nebo sestupně. + +⏳ PŘESNÁ FUNKCE ČASOVAČE: +Díky všestranné funkci časovače aplikace Hodiny Fossify budete mít přehled o svých úkolech. Přizpůsobte si preference vyzvánění, přepínejte vibrace a pozastavujte odpočítávání podle svých potřeb. Ať už časujete intervaly vaření, řídíte studijní sezení nebo zajišťujete včasné přestávky, aplikace Hodiny Fossify vám to umožní s přesností a lehkostí. + +🌈 WIDGET HODIN S PŘIZPŮSOBITELNÝMI FUNKCEMI: +Přeměňte svou domovskou obrazovku pomocí přizpůsobitelného widgetu aplikace Hodiny Fossify. Upravte si barvu textu, barvu pozadí a průhlednost. Vyberte si mezi analogovými nebo digitálními hodinami podle svého stylu a snadno získejte přístup k základním informacím o čase na první pohled. + +🎨 PŘIZPŮSOBITELNÉ ROZHRANÍ A MOTIVY: +Vychutnejte si přizpůsobené prostředí díky Material Designu a možnostem tmavých motivů v aplikaci Hodiny Fossify. Přizpůsobte si aplikaci podle sebe pomocí přizpůsobitelných barev a motivů, což zvyšuje použitelnost a snižuje namáhání očí, zejména v prostředí se slabým osvětlením. + +🔒 PŘÍSTUP ZAMĚŘENÝ PŘEDEVŠÍM NA SOUKROMÍ: +Aplikace Hodiny Fossify funguje v režimu offline a vaše soukromí je chráněno. Zažijte maximální soukromí, bezpečnost a stabilitu, aniž byste museli obětovat funkčnost nebo pohodlí. + +🌐 BEZ REKLAM A S OTEVŘENÝM ZDROJOVÝM KÓDEM: +Rozlučte se s vtíravými reklamami a zbytečnými povoleními. Aplikace Hodiny Fossify je bez reklam, plně open-source a poskytuje vám plnou kontrolu nad vaší časomírou. + +Vylepšete své dovednosti v oblasti správy času, optimalizujte své rutinní postupy a upřednostněte lepší spánek pomocí aplikace Hodiny Fossify. Stáhněte si je nyní a převezměte kontrolu nad svým časem jako nikdy předtím. + +Prozkoumejte další aplikace Fossify: https://www.fossify.org +Otevřený zdrojový kód: https://www.github.com/FossifyOrg +Přidejte se ke komunitě na Redditu: https://www.reddit.com/r/Fossify +Připojte se k Telegramu: https://t.me/Fossify From 41e0f0270f21db70a2d24e6df1ab732ae19c11c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=EB=B9=88?= Date: Sun, 23 Jun 2024 06:03:57 +0000 Subject: [PATCH 039/104] Translated using Weblate (Korean) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ko/ --- app/src/main/res/values-ko/strings.xml | 49 +++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 3ea04e70..f90806bd 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -1,2 +1,49 @@ - + + 시계 + 타이머 + 스톱워치 시작 + 구간 기록 + 타이머가 중지되었습니다 + 알림 최대 지속시간 + 시간 만료 + 시계 및 날짜 + 텍스트 그림자 사용 + 생성된 순서 + 아날로그 시계 + 디지털 시계 + 해제할 타이머를 선택하세요 + 해제할 알람을 선택하세요 + 알람이 %s에 의해 스누즈되었습니다 + 알람이 해제되었습니다 + 알람이 생성되었습니다 + 알람이 없습니다 + 알람 추가하기 + 타이머가 없습니다 + 타이머 추가하기 + 곧 울릴 알람 + 조기 알람 해제 + 타이머가 실행 중입니다 + + 타이머 %d 개가 실행 중입니다 + + 시계 탭 + 알람 탭 + 타이머 탭 + 음량 점점 크게 울리기 + 초 단위 표시하기 + 스톱워치 탭에서 구간 기록 정렬을 바꾸려면 어떻게 해야하나요? + 시계 + 진동 + 스톱워치 + 선택된 날짜가 없습니다 + 시간대 + 스톱워치가 중지되었습니다 + 오른쪽으로 밀어 해제하거나, 왼쪽으로 밀어 스누즈합니다. + 알람 시간 순서 + 날짜와 알람 시간 순서 + %s 타이머가 실행 중입니다 + 새로운 타이머 + 스톱워치 탭 + 아무 열이나 누르면, 해당 열에 대해 정렬됩니다. 다시 누르면 오름차순과 내림차순 정렬을 바꿀 수 있습니다. + \ No newline at end of file From ef90b8145200962c9f6bc7c0dd062c1726490879 Mon Sep 17 00:00:00 2001 From: ngocanhtve Date: Wed, 26 Jun 2024 13:24:35 +0000 Subject: [PATCH 040/104] Translated using Weblate (Vietnamese) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/vi/ --- app/src/main/res/values-vi/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 1968a289..276d8fd2 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -1,7 +1,7 @@ Đồng hồ - Không có ngày nào được chọn + Chưa chọn ngày nào Đồng hồ bấm giờ đã bị dừng Vuốt sang phải để Loại bỏ hoặc sang trái để Tạm ẩn. Múi giờ @@ -23,7 +23,7 @@ Đồng hồ kỹ thuật số Chỉ cần nhấn vào bất kỳ cột nào, điều đó sẽ làm cho các vòng được sắp xếp theo cột đã cho. Với những lần nhấn bổ sung, bạn có thể chuyển đổi giữa sắp xếp tăng dần và giảm dần. Chọn hẹn giờ để loại bỏ - Đã loại bỏ báo thức + Đã bỏ qua báo thức Chọn báo thức để loại bỏ Đã tạo báo thức Đã tạm ẩn báo thức %s @@ -40,10 +40,10 @@ %d bộ hẹn giờ đang chạy Danh mục đồng hồ - Danh mục báo thức + Tab báo thức Danh mục đếm giờ Danh mục hẹn giờ Hiển thị giây Tăng âm lượng dần dần Làm cách nào tôi có thể thay đổi cách sắp xếp vòng ở danh mục đồng hồ bấm giờ? - + \ No newline at end of file From 593ae9ef0719ff5601ff65c6a2dfcf0e86a25260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B9=D9=85=D8=A7=D8=B1?= Date: Sun, 30 Jun 2024 13:56:18 +0000 Subject: [PATCH 041/104] Translated using Weblate (Arabic) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ar/ --- app/src/main/res/values-ar/strings.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 1da18dd8..b2573ac1 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -43,4 +43,12 @@ زيادة الصوت تدريجيا كيف يمكنني تغيير فرز اللفات في علامة التبويب ساعة التوقيت؟ ما عليك سوى النقر فوق أي من الأعمدة ، مما يجعل الدورات مرتبة حسب العمود المحدد. بنقرات إضافية ، يمكنك التبديل بين الفرز التصاعدي والتنازلي. - + الساعة + الساعة + المؤقت + أضف منبهًا + أضف مؤقتًا + واجهة الساعة + واجهة المنبه + واجهة المؤقت + \ No newline at end of file From 67db53320b5caafb7781b52df47b692b1093d504 Mon Sep 17 00:00:00 2001 From: Alexander Gabilondo Date: Mon, 8 Jul 2024 14:29:27 +0000 Subject: [PATCH 042/104] Translated using Weblate (Basque) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/eu/ --- .../metadata/android/eu-ES/changelogs/1.txt | 1 + .../android/eu-ES/full_description.txt | 32 +++++++++++++++++++ .../android/eu-ES/short_description.txt | 1 + fastlane/metadata/android/eu-ES/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/eu-ES/changelogs/1.txt create mode 100644 fastlane/metadata/android/eu-ES/full_description.txt create mode 100644 fastlane/metadata/android/eu-ES/short_description.txt create mode 100644 fastlane/metadata/android/eu-ES/title.txt diff --git a/fastlane/metadata/android/eu-ES/changelogs/1.txt b/fastlane/metadata/android/eu-ES/changelogs/1.txt new file mode 100644 index 00000000..5dcf4e7a --- /dev/null +++ b/fastlane/metadata/android/eu-ES/changelogs/1.txt @@ -0,0 +1 @@ +* Lehenengo bertsioa. diff --git a/fastlane/metadata/android/eu-ES/full_description.txt b/fastlane/metadata/android/eu-ES/full_description.txt new file mode 100644 index 00000000..1b3b210d --- /dev/null +++ b/fastlane/metadata/android/eu-ES/full_description.txt @@ -0,0 +1,32 @@ +Fossify erlojua aurkezten dugu: zure eguneroko ohiturak hobetzeko eta lo egiteko ohitura hobeak sustatzeko diseinatutako denbora-konpainia bikaina. Zure beharretara egokitutako funtzio ugarirekin, Fossify erlojua ezin hobeto integratzen da zure bizitzan, erosotasun eta aldakortasun paregabeak eskainiz. + + FUNTZUN ANITZEKO kronometroa: +Bizi ezazu denbora-kudeaketa polifazetikoa Fossify Clock-ekin. Erlojuaren widget gisa jardutetik iratzargailu eta kronometro gisa funtzionatzera, aplikazio hau zure eguneroko jarduerak erregulatzeko eta zure bizimodu orokorra hobetzeko tresna erabilgarria da. + + EZAUGARRI ABERATSEKO ALARMA: +Esnatu freskatu Fossify erlojuaren alarma-funtzio osoekin. Ezarri alarma anitz egun hautatzeko aukerarekin, bibrazio-aldaketa, etiketa pertsonalizatuak eta dei-tonuak pertsonalizatzea. Gozatu bolumena pixkanaka handitzea eta errepikatzeko botoi pertsonalizagarria esnatzeko esperientzia atsegina izateko. Erabiltzaile-interfazearekin, alarmak konfiguratzea ez da inoiz erraza izan. + +️ KRONOMETRO ZEHATZA: +Jarraitu zure jarduerei zehaztasunez Fossify erlojuaren kronometroaren funtzioa erabiliz. Neurtu denbora luzeagoak edo banakako itzuliak esfortzurik gabe. Zure itzuliak goranzko edo beheranzko ordenan ere ordena ditzakezu. + + TENPORIZATOREAREN FUNTZIONALITATEA: +Egon zure zereginen gainean Fossify erlojuaren tenporizadore-funtzio polifazetikoarekin. Pertsonalizatu dei-tonuen hobespenak, aldatu bibrazioak eta pausatu atzerako kontaketa zure beharretara egokitzeko. Sukalde-lanetako tarteak, ikasketa saioak kudeatzen edo atsedenaldi puntualak ziurtatzen ari zaren ala ez, Fossify erlojuak zehaztasun eta erraztasunarekin estali zaitu. + +🌈 ERLOUAREN TREPETA PERTSONALIZATZEKO EZAUGARRIEKIN: +Eraldatu zure hasierako pantaila Fossify erlojuaren erloju trepeta pertsonalizagarriarekin. Doitu testuaren kolorea, atzeko planoaren kolorea eta gardentasuna. Aukeratu erloju analogikoa edo digitala zure estilora egokitzeko eta erraz eskura ezazu orduko funtsezko informazioa begiratu batean. + +🎨 INTERFAZE ETA GAI PERTSONALIZAGARRIAK: +Gozatu esperientzia pertsonalizatua Fossify erlojuaren materialaren diseinuarekin eta gai iluneko aukerekin. Egokitu aplikazioa zure hobespenetara kolore eta gai pertsonalizatuekin, erabilgarritasuna hobetuz eta begien nekea murriztuz, batez ere argi gutxiko inguruneetan. + +🔒 PRIBATUTASUNA-LEHEN HURBILKETA: +Lasai egon zure pribatutasuna Fossify erlojuaren lineaz kanpoko funtzionamenduarekin babestuta dagoela. Bizi ezazu pribatutasun, segurtasun eta egonkortasun handiena funtzionaltasunari edo erosotasunari uko egin gabe. + +🌐 IRAGARKI GABE ETA ITURRI IREKIA: +Esan agur iragarki intrusiboei eta beharrezkoak ez diren baimenei. Fossify erlojua iragarkirik gabekoa da, guztiz kode irekikoa, eta zure denbora-esperientziaren kontrol osoa ematen dizu. + +Hobetu zure denbora kudeatzeko trebetasunak, optimizatu zure errutinak eta lehenetsi lo hobeago Fossify erlojuarekin. Deskargatu orain eta hartu zure denbora inoiz ez bezala kontrolatu. + +Arakatu Fossify aplikazio gehiago: https://www.fossify.org +Iturburu irekiko kodea: https://www.github.com/FossifyOrg +Sartu komunitatean Reddit-en: https://www.reddit.com/r/Fossify +Konektatu Telegram-en: https://t.me/Fossify diff --git a/fastlane/metadata/android/eu-ES/short_description.txt b/fastlane/metadata/android/eu-ES/short_description.txt new file mode 100644 index 00000000..7c499360 --- /dev/null +++ b/fastlane/metadata/android/eu-ES/short_description.txt @@ -0,0 +1 @@ +Erloju-aplikazio arina eta kode irekikoa, funtsezko ezaugarriak dituena. diff --git a/fastlane/metadata/android/eu-ES/title.txt b/fastlane/metadata/android/eu-ES/title.txt new file mode 100644 index 00000000..2a02e934 --- /dev/null +++ b/fastlane/metadata/android/eu-ES/title.txt @@ -0,0 +1 @@ +Fossify erlojua From 736b1cebc6b10f4726d7d10f2a03bbc81436a23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Pierini?= Date: Mon, 8 Jul 2024 12:50:22 +0000 Subject: [PATCH 043/104] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/es/ --- fastlane/metadata/android/es-ES/title.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/es-ES/title.txt b/fastlane/metadata/android/es-ES/title.txt index 16fe316b..b2d84e19 100644 --- a/fastlane/metadata/android/es-ES/title.txt +++ b/fastlane/metadata/android/es-ES/title.txt @@ -1 +1 @@ -Fossify Clock +Reloj Fossify From 304a2acf3e72154d4da8bcc8ea2ecc159b122773 Mon Sep 17 00:00:00 2001 From: "P.O" Date: Sun, 14 Jul 2024 15:49:15 +0000 Subject: [PATCH 044/104] Translated using Weblate (Swedish) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/sv/ --- fastlane/metadata/android/sv-SE/changelogs/1.txt | 1 + fastlane/metadata/android/sv-SE/short_description.txt | 1 + fastlane/metadata/android/sv-SE/title.txt | 1 + 3 files changed, 3 insertions(+) create mode 100644 fastlane/metadata/android/sv-SE/changelogs/1.txt create mode 100644 fastlane/metadata/android/sv-SE/short_description.txt create mode 100644 fastlane/metadata/android/sv-SE/title.txt diff --git a/fastlane/metadata/android/sv-SE/changelogs/1.txt b/fastlane/metadata/android/sv-SE/changelogs/1.txt new file mode 100644 index 00000000..d1b6e00d --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/1.txt @@ -0,0 +1 @@ +* Initial version. diff --git a/fastlane/metadata/android/sv-SE/short_description.txt b/fastlane/metadata/android/sv-SE/short_description.txt new file mode 100644 index 00000000..76e8de99 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/short_description.txt @@ -0,0 +1 @@ +Användbar och minimalistisk klockapp med öppen källkod. diff --git a/fastlane/metadata/android/sv-SE/title.txt b/fastlane/metadata/android/sv-SE/title.txt new file mode 100644 index 00000000..16fe316b --- /dev/null +++ b/fastlane/metadata/android/sv-SE/title.txt @@ -0,0 +1 @@ +Fossify Clock From 17214fadad919e1151006f0a6b2cbe4a093f597a Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Wed, 24 Jul 2024 16:11:53 +0530 Subject: [PATCH 045/104] Bump GH actions --- .github/workflows/image-minimizer.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml index 56c6eb37..d9241c33 100644 --- a/.github/workflows/image-minimizer.yml +++ b/.github/workflows/image-minimizer.yml @@ -17,9 +17,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 16 @@ -27,7 +27,7 @@ jobs: run: npm i probe-image-size@7.2.3 --ignore-scripts - name: Minimize simple images - uses: actions/github-script@v6 + uses: actions/github-script@v7 timeout-minutes: 3 with: script: | From 865386d42ef57289ad898c86cbca188c52e7b57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 28 Sep 2024 12:50:11 +0200 Subject: [PATCH 046/104] Add reusable workflows for PRs and testing builds --- .github/workflows/pr.yml | 9 + .github/workflows/testing-build.yml | 10 + app/build.gradle.kts | 9 +- app/detekt-baseline.xml | 334 +++++ app/lint-baseline.xml | 1811 +++++++++++++++++++++++++++ build.gradle.kts | 1 + gradle/libs.versions.toml | 3 + 7 files changed, 2176 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr.yml create mode 100644 .github/workflows/testing-build.yml create mode 100644 app/detekt-baseline.xml create mode 100644 app/lint-baseline.xml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..36adc78e --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,9 @@ +name: PR + +on: + pull_request: + branches: [ master ] + +jobs: + call-pr-workflow: + uses: FossifyOrg/.github/.github/workflows/pr.yml@main diff --git a/.github/workflows/testing-build.yml b/.github/workflows/testing-build.yml new file mode 100644 index 00000000..33379f92 --- /dev/null +++ b/.github/workflows/testing-build.yml @@ -0,0 +1,10 @@ +name: Testing build (on PR) + +on: + pull_request: + branches: [ master ] + types: [ labeled, opened, synchronize, reopened ] + +jobs: + call-testing-build-workflow: + uses: FossifyOrg/.github/.github/workflows/testing-build.yml@main diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f0bcf6df..11afb601 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,6 +7,7 @@ plugins { alias(libs.plugins.android) alias(libs.plugins.kotlinAndroid) alias(libs.plugins.ksp) + alias(libs.plugins.detekt) } val keystorePropertiesFile: File = rootProject.file("keystore.properties") @@ -91,10 +92,16 @@ android { lint { checkReleaseBuilds = false - abortOnError = false + abortOnError = true + warningsAsErrors = true + baseline = file("lint-baseline.xml") } } +detekt { + baseline = file("detekt-baseline.xml") +} + dependencies { implementation(libs.fossify.commons) diff --git a/app/detekt-baseline.xml b/app/detekt-baseline.xml new file mode 100644 index 00000000..2c305f32 --- /dev/null +++ b/app/detekt-baseline.xml @@ -0,0 +1,334 @@ + + + + + ComplexCondition:IntentHandlerActivity.kt$IntentHandlerActivity$existingTimer != null && skipUi && (existingTimer.state is TimerState.Idle || (existingTimer.state is TimerState.Finished && !existingTimer.oneShot)) + CyclomaticComplexMethod:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.dismissAlarm() + CyclomaticComplexMethod:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.setNewAlarm() + EmptyCatchBlock:Context.kt${ } + EmptyCatchBlock:ReminderActivity.kt$ReminderActivity${ } + EmptyFunctionBlock:AlarmsAdapter.kt$AlarmsAdapter${} + EmptyFunctionBlock:StopwatchAdapter.kt$StopwatchAdapter${} + EmptyFunctionBlock:TimeZonesAdapter.kt$TimeZonesAdapter${} + EmptyFunctionBlock:TimerAdapter.kt$TimerAdapter${} + EmptyFunctionBlock:WidgetAnalogueConfigureActivity.kt$WidgetAnalogueConfigureActivity.<no name provided>${} + EmptyFunctionBlock:WidgetDigitalConfigureActivity.kt$WidgetDigitalConfigureActivity.<no name provided>${} + LongMethod:Constants.kt$fun getAllTimeZones() + LongMethod:Context.kt$fun Context.getTimerNotification(timer: Timer, pendingIntent: PendingIntent, addDeleteIntent: Boolean): Notification + LongMethod:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.dismissAlarm() + LongMethod:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.setNewAlarm() + LongMethod:ReminderActivity.kt$ReminderActivity$@SuppressLint("ClickableViewAccessibility") private fun setupAlarmButtons() + MagicNumber:AlarmReceiver.kt$AlarmReceiver$1000L + MagicNumber:AlarmsAdapter.kt$AlarmsAdapter$60 + MagicNumber:App.kt$App$1000L + MagicNumber:App.kt$App.<no name provided>$1000 + MagicNumber:ClockFragment.kt$ClockFragment$1000L + MagicNumber:ClockFragment.kt$ClockFragment$24 + MagicNumber:ClockFragment.kt$ClockFragment$3600 + MagicNumber:ClockFragment.kt$ClockFragment$60 + MagicNumber:Config.kt$Config$300 + MagicNumber:Constants.kt$10 + MagicNumber:Constants.kt$1000 + MagicNumber:Constants.kt$11 + MagicNumber:Constants.kt$12 + MagicNumber:Constants.kt$13 + MagicNumber:Constants.kt$14 + MagicNumber:Constants.kt$15 + MagicNumber:Constants.kt$16 + MagicNumber:Constants.kt$17 + MagicNumber:Constants.kt$18 + MagicNumber:Constants.kt$19 + MagicNumber:Constants.kt$20 + MagicNumber:Constants.kt$21 + MagicNumber:Constants.kt$22 + MagicNumber:Constants.kt$23 + MagicNumber:Constants.kt$24 + MagicNumber:Constants.kt$25 + MagicNumber:Constants.kt$26 + MagicNumber:Constants.kt$27 + MagicNumber:Constants.kt$28 + MagicNumber:Constants.kt$29 + MagicNumber:Constants.kt$3 + MagicNumber:Constants.kt$30 + MagicNumber:Constants.kt$31 + MagicNumber:Constants.kt$32 + MagicNumber:Constants.kt$33 + MagicNumber:Constants.kt$34 + MagicNumber:Constants.kt$35 + MagicNumber:Constants.kt$36 + MagicNumber:Constants.kt$37 + MagicNumber:Constants.kt$38 + MagicNumber:Constants.kt$39 + MagicNumber:Constants.kt$4 + MagicNumber:Constants.kt$40 + MagicNumber:Constants.kt$41 + MagicNumber:Constants.kt$42 + MagicNumber:Constants.kt$43 + MagicNumber:Constants.kt$44 + MagicNumber:Constants.kt$45 + MagicNumber:Constants.kt$46 + MagicNumber:Constants.kt$47 + MagicNumber:Constants.kt$48 + MagicNumber:Constants.kt$49 + MagicNumber:Constants.kt$5 + MagicNumber:Constants.kt$50 + MagicNumber:Constants.kt$51 + MagicNumber:Constants.kt$52 + MagicNumber:Constants.kt$53 + MagicNumber:Constants.kt$54 + MagicNumber:Constants.kt$55 + MagicNumber:Constants.kt$56 + MagicNumber:Constants.kt$57 + MagicNumber:Constants.kt$58 + MagicNumber:Constants.kt$59 + MagicNumber:Constants.kt$6 + MagicNumber:Constants.kt$60 + MagicNumber:Constants.kt$61 + MagicNumber:Constants.kt$62 + MagicNumber:Constants.kt$63 + MagicNumber:Constants.kt$64 + MagicNumber:Constants.kt$65 + MagicNumber:Constants.kt$66 + MagicNumber:Constants.kt$67 + MagicNumber:Constants.kt$68 + MagicNumber:Constants.kt$69 + MagicNumber:Constants.kt$7 + MagicNumber:Constants.kt$70 + MagicNumber:Constants.kt$71 + MagicNumber:Constants.kt$72 + MagicNumber:Constants.kt$73 + MagicNumber:Constants.kt$74 + MagicNumber:Constants.kt$75 + MagicNumber:Constants.kt$76 + MagicNumber:Constants.kt$77 + MagicNumber:Constants.kt$78 + MagicNumber:Constants.kt$79 + MagicNumber:Constants.kt$8 + MagicNumber:Constants.kt$80 + MagicNumber:Constants.kt$81 + MagicNumber:Constants.kt$82 + MagicNumber:Constants.kt$83 + MagicNumber:Constants.kt$84 + MagicNumber:Constants.kt$85 + MagicNumber:Constants.kt$86 + MagicNumber:Constants.kt$87 + MagicNumber:Constants.kt$88 + MagicNumber:Constants.kt$89 + MagicNumber:Constants.kt$9 + MagicNumber:Context.kt$0.4f + MagicNumber:Context.kt$1000 + MagicNumber:Context.kt$12 + MagicNumber:Context.kt$2 + MagicNumber:Context.kt$24 + MagicNumber:Context.kt$3 + MagicNumber:Context.kt$3600 + MagicNumber:Context.kt$5 + MagicNumber:Context.kt$500 + MagicNumber:Context.kt$60 + MagicNumber:Context.kt$7 + MagicNumber:DBHelper.kt$DBHelper$420 + MagicNumber:DBHelper.kt$DBHelper$540 + MagicNumber:DismissAlarmReceiver.kt$DismissAlarmReceiver$5 + MagicNumber:DismissAlarmReceiver.kt$DismissAlarmReceiver$7 + MagicNumber:EditAlarmDialog.kt$EditAlarmDialog$3 + MagicNumber:EditAlarmDialog.kt$EditAlarmDialog$4 + MagicNumber:EditAlarmDialog.kt$EditAlarmDialog$5 + MagicNumber:EditAlarmDialog.kt$EditAlarmDialog$6 + MagicNumber:EditAlarmDialog.kt$EditAlarmDialog$60 + MagicNumber:EditTimerDialog.kt$EditTimerDialog$10 + MagicNumber:EditTimerDialog.kt$EditTimerDialog$60 + MagicNumber:IntentHandlerActivity.kt$IntentHandlerActivity$11 + MagicNumber:IntentHandlerActivity.kt$IntentHandlerActivity$12 + MagicNumber:IntentHandlerActivity.kt$IntentHandlerActivity$23 + MagicNumber:IntentHandlerActivity.kt$IntentHandlerActivity$59 + MagicNumber:IntentHandlerActivity.kt$IntentHandlerActivity$60 + MagicNumber:Long.kt$100 + MagicNumber:Long.kt$1000 + MagicNumber:Long.kt$1000F + MagicNumber:MainActivity.kt$MainActivity$3 + MagicNumber:MyTimePickerDialogDialog.kt$MyTimePickerDialogDialog$3600 + MagicNumber:MyTimePickerDialogDialog.kt$MyTimePickerDialogDialog$60 + MagicNumber:ReminderActivity.kt$ReminderActivity$0.1f + MagicNumber:ReminderActivity.kt$ReminderActivity$0.2f + MagicNumber:ReminderActivity.kt$ReminderActivity$1000L + MagicNumber:ReminderActivity.kt$ReminderActivity$2000L + MagicNumber:ReminderActivity.kt$ReminderActivity$500 + MagicNumber:ReminderActivity.kt$ReminderActivity$50f + MagicNumber:ReminderActivity.kt$ReminderActivity$7 + MagicNumber:Stopwatch.kt$Stopwatch.<no name provided>$10 + MagicNumber:StopwatchService.kt$StopwatchService.<no name provided>$500L + MagicNumber:TimeZonesAdapter.kt$TimeZonesAdapter$1000 + MagicNumber:TimerAdapter.kt$TimerAdapter$0.7f + MagicNumber:TimerFragment.kt$TimerFragment$1000 + MagicNumber:ViewPagerAdapter.kt$ViewPagerAdapter$3 + MagicNumber:WidgetAnalogueConfigureActivity.kt$WidgetAnalogueConfigureActivity$100 + MagicNumber:WidgetDigitalConfigureActivity.kt$WidgetDigitalConfigureActivity$100 + MaxLineLength:AlarmReceiver.kt$AlarmReceiver$NotificationChannel(ALARM_NOTIFICATION_CHANNEL_ID, "Alarm", NotificationManager.IMPORTANCE_HIGH) + MaxLineLength:AlarmReceiver.kt$AlarmReceiver$oldNotificationChannelCleanup(notificationManager) + MaxLineLength:AlarmReceiver.kt$AlarmReceiver$val + MaxLineLength:ClockFragment.kt$ClockFragment$binding.clockTime.textSize = resources.getDimension(R.dimen.clock_text_size_smaller) / resources.displayMetrics.density + MaxLineLength:ClockFragment.kt$ClockFragment$val timeZones = requireContext().getAllTimeZonesModified().filter { selectedTimeZoneIDs.contains(it.id) } as ArrayList<MyTimeZone> + MaxLineLength:Config.kt$Config$set(increaseVolumeGradually) = prefs.edit().putBoolean(INCREASE_VOLUME_GRADUALLY, increaseVolumeGradually).apply() + MaxLineLength:Context.kt$. + MaxLineLength:Context.kt$AlarmManagerCompat.setExactAndAllowWhileIdle(alarmManager, 0, dismissalTriggerTime, getEarlyAlarmDismissalIntent(alarm)) + MaxLineLength:Context.kt$PendingIntent.getActivity(this, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$PendingIntent.getService(this, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$fun Context.getModifiedTimeZoneTitle(id: Int) + MaxLineLength:Context.kt$return PendingIntent.getActivity(this, OPEN_ALARMS_TAB_INTENT_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getActivity(this, OPEN_STOPWATCH_TAB_INTENT_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getActivity(this, REMINDER_ACTIVITY_INTENT_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getActivity(this, timerId, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getBroadcast(this, EARLY_ALARM_DISMISSAL_INTENT_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getBroadcast(this, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getBroadcast(this, alarmId, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$return PendingIntent.getBroadcast(this, timerId, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:Context.kt$val dayBits = arrayListOf(MONDAY_BIT, TUESDAY_BIT, WEDNESDAY_BIT, THURSDAY_BIT, FRIDAY_BIT, SATURDAY_BIT, SUNDAY_BIT) + MaxLineLength:Context.kt$val fullString = String.format(getString(org.fossify.commons.R.string.time_remaining), formatMinutesToTimeString(totalMinutes)) + MaxLineLength:DBHelper.kt$DBHelper$"$COL_IS_ENABLED INTEGER, $COL_VIBRATE INTEGER, $COL_SOUND_TITLE TEXT, $COL_SOUND_URI TEXT, $COL_LABEL TEXT, $COL_ONE_SHOT INTEGER)" + MaxLineLength:DBHelper.kt$DBHelper$"CREATE TABLE IF NOT EXISTS $ALARMS_TABLE_NAME ($COL_ID INTEGER PRIMARY KEY AUTOINCREMENT, $COL_TIME_IN_MINUTES INTEGER, $COL_DAYS INTEGER, " + MaxLineLength:DBHelper.kt$DBHelper$val alarm = Alarm(id, timeInMinutes, days, isEnabled, vibrate, soundTitle, soundUri, label, oneShot) + MaxLineLength:DBHelper.kt$DBHelper$val cols = arrayOf(COL_ID, COL_TIME_IN_MINUTES, COL_DAYS, COL_IS_ENABLED, COL_VIBRATE, COL_SOUND_TITLE, COL_SOUND_URI, COL_LABEL, COL_ONE_SHOT) + MaxLineLength:EditAlarmDialog.kt$EditAlarmDialog$SelectAlarmSoundDialog + MaxLineLength:EditAlarmDialog.kt$EditAlarmDialog$class + MaxLineLength:EditAlarmDialog.kt$EditAlarmDialog$val dayLetters = activity.resources.getStringArray(org.fossify.commons.R.array.week_day_letters).toList() as ArrayList<String> + MaxLineLength:EditTimeZoneDialog.kt$EditTimeZoneDialog$. + MaxLineLength:IntentHandlerActivity.kt$IntentHandlerActivity$&& + MaxLineLength:IntentHandlerActivity.kt$IntentHandlerActivity$alarms = alarms.filter { it.timeInMinutes / 60 == hour || it.timeInMinutes / 60 == hour + 12 } + MaxLineLength:IntentHandlerActivity.kt$IntentHandlerActivity$it.timeInMinutes == timeInMinutes && (it.days.isBitSet(dayBitToLookFor) || it.days == dayToLookFor) + MaxLineLength:Long.kt$val seconds = TimeUnit.MILLISECONDS.toSeconds(this) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(this)) + MaxLineLength:MainActivity.kt$MainActivity$(drawable as LayerDrawable).findDrawableByLayerId(R.id.shortcut_stopwatch_background).applyColorFilter(appIconColor) + MaxLineLength:MainActivity.kt$MainActivity$binding.mainTabsHolder.getTabAt(binding.viewPager.currentItem)?.icon?.applyColorFilter(getProperPrimaryColor()) + MaxLineLength:MainActivity.kt$MainActivity$binding.mainTabsHolder.newTab().setCustomView(org.fossify.commons.R.layout.bottom_tablayout_item) + MaxLineLength:MainActivity.kt$MainActivity$faqItems.add(FAQItem(org.fossify.commons.R.string.faq_2_title_commons, org.fossify.commons.R.string.faq_2_text_commons)) + MaxLineLength:MainActivity.kt$MainActivity$faqItems.add(FAQItem(org.fossify.commons.R.string.faq_6_title_commons, org.fossify.commons.R.string.faq_6_text_commons)) + MaxLineLength:MainActivity.kt$MainActivity$findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(org.fossify.commons.R.bool.hide_google_relations) + MaxLineLength:MainActivity.kt$MainActivity$updateMaterialActivityViews(binding.mainCoordinator, binding.mainHolder, useTransparentNavigation = false, useTopSearchMenu = false) + MaxLineLength:MyAnalogueTimeWidgetProvider.kt$MyAnalogueTimeWidgetProvider$override + MaxLineLength:MyAnalogueTimeWidgetProvider.kt$MyAnalogueTimeWidgetProvider$val pendingIntent = PendingIntent.getActivity(context, OPEN_APP_INTENT_ID, this, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:MyDigitalTimeWidgetProvider.kt$MyDigitalTimeWidgetProvider$override + MaxLineLength:MyDigitalTimeWidgetProvider.kt$MyDigitalTimeWidgetProvider$val pendingIntent = PendingIntent.getActivity(context, OPEN_APP_INTENT_ID, this, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) + MaxLineLength:MyTimePickerDialogDialog.kt$MyTimePickerDialogDialog$class + MaxLineLength:ReminderActivity.kt$ReminderActivity$arrayOf(binding.reminderSnooze, binding.reminderDraggableBackground, binding.reminderDraggable, binding.reminderDismiss) + MaxLineLength:ReminderActivity.kt$ReminderActivity$binding.reminderStop.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, getProperPrimaryColor()) + MaxLineLength:ReminderActivity.kt$ReminderActivity$binding.reminderText.text = if (isAlarmReminder) getFormattedTime(getPassedSeconds(), false, false) else getString(R.string.time_expired) + MaxLineLength:ReminderActivity.kt$ReminderActivity$scheduleVolumeIncrease(MIN_ALARM_VOLUME_FOR_INCREASING_ALARMS.toFloat(), initialAlarmVolume!!.toFloat(), 0) + MaxLineLength:SelectAlarmDialog.kt$SelectAlarmDialog$binding.dialogSelectAlarmRadio.addView(radioButton, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)) + MaxLineLength:SelectAlarmDialog.kt$SelectAlarmDialog$setColors(activity.getProperTextColor(), activity.getProperPrimaryColor(), activity.getProperBackgroundColor()) + MaxLineLength:SelectTimeZonesAdapter.kt$SelectTimeZonesAdapter$class + MaxLineLength:SettingsActivity.kt$SettingsActivity$binding.settingsUseEnglishHolder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") && !isTiramisuPlus()) + MaxLineLength:SettingsActivity.kt$SettingsActivity$updateMaterialActivityViews(binding.settingsCoordinator, binding.settingsHolder, useTransparentNavigation = true, useTopSearchMenu = false) + MaxLineLength:StopwatchAdapter.kt$StopwatchAdapter$class + MaxLineLength:StopwatchFragment.kt$StopwatchFragment$if (state == Stopwatch.State.RUNNING) org.fossify.commons.R.drawable.ic_pause_vector else org.fossify.commons.R.drawable.ic_play_vector + MaxLineLength:StopwatchFragment.kt$StopwatchFragment$stopwatchPlayPause.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, properPrimaryColor) + MaxLineLength:StopwatchFragment.kt$StopwatchFragment$var bitmap = requireContext().resources.getColoredBitmap(R.drawable.ic_sorting_triangle_vector, requireContext().getProperPrimaryColor()) + MaxLineLength:TimeZonesAdapter.kt$TimeZonesAdapter$class + MaxLineLength:TimerAdapter.kt$TimerAdapter$is TimerState.Finished -> EventBus.getDefault().post(TimerEvent.Start(timer.id!!, timer.seconds.secondsToMillis)) + MaxLineLength:TimerAdapter.kt$TimerAdapter$is TimerState.Idle -> EventBus.getDefault().post(TimerEvent.Start(timer.id!!, timer.seconds.secondsToMillis)) + MaxLineLength:TimerAdapter.kt$TimerAdapter$is TimerState.Running -> EventBus.getDefault().post(TimerEvent.Pause(timer.id!!, state.tick)) + MaxLineLength:TimerAdapter.kt$TimerAdapter$val resetPossible = state is TimerState.Running || state is TimerState.Paused || state is TimerState.Finished + MaxLineLength:TimerFragment.kt$TimerFragment$if + MaxLineLength:TimerFragment.kt$TimerFragment$timerAdapter = TimerAdapter(requireActivity() as SimpleActivity, binding.timersList, ::refreshTimers, ::openEditTimer) + MaxLineLength:TimerService.kt$TimerService$else -> resources.getQuantityString(R.plurals.timer_notification_msg, runningTimers.size, runningTimers.size) + MaxLineLength:TimerService.kt$TimerService$firstTimer.label.isNotEmpty() -> getString(R.string.timer_single_notification_label_msg, firstTimer.label) + MaxLineLength:TimerService.kt$TimerService$startForeground(TIMER_RUNNING_NOTIF_ID, notification(formattedDuration, contextText, firstTimer.id!!)) + MaxLineLength:TimerService.kt$TimerService$startForeground(TIMER_RUNNING_NOTIF_ID, notification(getString(R.string.app_name), getString(R.string.timers_notification_msg), INVALID_TIMER_ID)) + MaxLineLength:WidgetAnalogueConfigureActivity.kt$WidgetAnalogueConfigureActivity$if + MaxLineLength:WidgetDigitalConfigureActivity.kt$WidgetDigitalConfigureActivity$if + NestedBlockDepth:AlarmReceiver.kt$AlarmReceiver$override fun onReceive(context: Context, intent: Intent) + NestedBlockDepth:Context.kt$fun Context.scheduleNextAlarm(alarm: Alarm, showToast: Boolean) + NestedBlockDepth:DBHelper.kt$DBHelper$fun getAlarms(): ArrayList<Alarm> + NestedBlockDepth:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.dismissAlarm() + NestedBlockDepth:IntentHandlerActivity.kt$IntentHandlerActivity$private fun Intent.setNewAlarm() + ReturnCount:Context.kt$fun Context.firstDayOrder(bitMask: Int): Int + SwallowedException:Config.kt$Config$e: Exception + SwallowedException:Context.kt$e: Exception + SwallowedException:Converters.kt$Converters$e: Exception + SwallowedException:DBHelper.kt$DBHelper$e: Exception + SwallowedException:IntentHandlerActivity.kt$IntentHandlerActivity$e: Exception + SwallowedException:ReminderActivity.kt$ReminderActivity$e: Exception + TooGenericExceptionCaught:AlarmReceiver.kt$AlarmReceiver$e: Exception + TooGenericExceptionCaught:App.kt$App$e: Exception + TooGenericExceptionCaught:Config.kt$Config$e: Exception + TooGenericExceptionCaught:Context.kt$e: Exception + TooGenericExceptionCaught:Converters.kt$Converters$e: Exception + TooGenericExceptionCaught:DBHelper.kt$DBHelper$e: Exception + TooGenericExceptionCaught:IntentHandlerActivity.kt$IntentHandlerActivity$e: Exception + TooGenericExceptionCaught:ReminderActivity.kt$ReminderActivity$e: Exception + TooGenericExceptionCaught:StopwatchService.kt$e: Exception + TooGenericExceptionCaught:TimerService.kt$TimerService$e: Exception + TooGenericExceptionCaught:TimerService.kt$e: Exception + TooGenericExceptionThrown:ViewPagerAdapter.kt$ViewPagerAdapter$throw RuntimeException("Trying to fetch unknown fragment id $position") + TooManyFunctions:AlarmFragment.kt$AlarmFragment : FragmentToggleAlarmInterface + TooManyFunctions:AlarmsAdapter.kt$AlarmsAdapter : MyRecyclerViewAdapter + TooManyFunctions:Constants.kt$org.fossify.clock.helpers.Constants.kt + TooManyFunctions:Context.kt$org.fossify.clock.extensions.Context.kt + TooManyFunctions:DBHelper.kt$DBHelper : SQLiteOpenHelper + TooManyFunctions:IntentHandlerActivity.kt$IntentHandlerActivity : SimpleActivity + TooManyFunctions:MainActivity.kt$MainActivity : SimpleActivity + TooManyFunctions:ReminderActivity.kt$ReminderActivity : SimpleActivity + TooManyFunctions:SettingsActivity.kt$SettingsActivity : SimpleActivity + TooManyFunctions:StopwatchAdapter.kt$StopwatchAdapter : MyRecyclerViewAdapter + TooManyFunctions:StopwatchFragment.kt$StopwatchFragment : Fragment + TooManyFunctions:TimeZonesAdapter.kt$TimeZonesAdapter : MyRecyclerViewAdapter + TooManyFunctions:TimerAdapter.kt$TimerAdapter : MyRecyclerViewListAdapter + TooManyFunctions:ViewPagerAdapter.kt$ViewPagerAdapter : FragmentStatePagerAdapter + UnusedParameter:AlarmFragment.kt$AlarmFragment$event: AlarmEvent.Refresh + UnusedParameter:MyDigitalTimeWidgetProvider.kt$MyDigitalTimeWidgetProvider$context: Context + UnusedParameter:StopwatchService.kt$StopwatchService$event: StopwatchStopService + UnusedParameter:TimerFragment.kt$TimerFragment$event: TimerEvent.Refresh + UnusedParameter:TimerService.kt$TimerService$event: TimerEvent.Refresh + UnusedParameter:TimerService.kt$TimerService$event: TimerStopService + UnusedPrivateMember:App.kt$App$@OnLifecycleEvent(Lifecycle.Event.ON_START) private fun onAppForegrounded() + UnusedPrivateMember:App.kt$App$@OnLifecycleEvent(Lifecycle.Event.ON_STOP) private fun onAppBackgrounded() + VariableNaming:ClockFragment.kt$ClockFragment$private val ONE_SECOND = 1000L + VariableNaming:DBHelper.kt$DBHelper$private val ALARMS_TABLE_NAME = "contacts" // wrong table name, ignore it + VariableNaming:DBHelper.kt$DBHelper$private val COL_DAYS = "days" + VariableNaming:DBHelper.kt$DBHelper$private val COL_ID = "id" + VariableNaming:DBHelper.kt$DBHelper$private val COL_IS_ENABLED = "is_enabled" + VariableNaming:DBHelper.kt$DBHelper$private val COL_LABEL = "label" + VariableNaming:DBHelper.kt$DBHelper$private val COL_ONE_SHOT = "one_shot" + VariableNaming:DBHelper.kt$DBHelper$private val COL_SOUND_TITLE = "sound_title" + VariableNaming:DBHelper.kt$DBHelper$private val COL_SOUND_URI = "sound_uri" + VariableNaming:DBHelper.kt$DBHelper$private val COL_TIME_IN_MINUTES = "time_in_minutes" + VariableNaming:DBHelper.kt$DBHelper$private val COL_VIBRATE = "vibrate" + VariableNaming:Long.kt$val MSFormat = if (useLongerMSFormat) "%03d" else "%01d" + VariableNaming:TimerFragment.kt$TimerFragment$private val INVALID_POSITION = -1 + WildcardImport:AlarmFragment.kt$import org.fossify.clock.extensions.* + WildcardImport:AlarmFragment.kt$import org.fossify.clock.helpers.* + WildcardImport:AlarmReceiver.kt$import org.fossify.clock.extensions.* + WildcardImport:AlarmsAdapter.kt$import org.fossify.clock.extensions.* + WildcardImport:App.kt$import org.fossify.clock.extensions.* + WildcardImport:ClockFragment.kt$import org.fossify.clock.extensions.* + WildcardImport:Constants.kt$import org.fossify.commons.helpers.* + WildcardImport:Context.kt$import android.app.* + WildcardImport:Context.kt$import org.fossify.clock.helpers.* + WildcardImport:Context.kt$import org.fossify.clock.receivers.* + WildcardImport:Context.kt$import org.fossify.commons.extensions.* + WildcardImport:Context.kt$import org.fossify.commons.helpers.* + WildcardImport:DBHelper.kt$import org.fossify.commons.helpers.* + WildcardImport:DismissAlarmReceiver.kt$import org.fossify.clock.extensions.* + WildcardImport:EditAlarmDialog.kt$import org.fossify.clock.extensions.* + WildcardImport:EditAlarmDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:EditTimerDialog.kt$import org.fossify.clock.extensions.* + WildcardImport:EditTimerDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:IntentHandlerActivity.kt$import org.fossify.clock.extensions.* + WildcardImport:IntentHandlerActivity.kt$import org.fossify.clock.helpers.* + WildcardImport:IntentHandlerActivity.kt$import org.fossify.clock.models.* + WildcardImport:MainActivity.kt$import org.fossify.clock.helpers.* + WildcardImport:MainActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:MainActivity.kt$import org.fossify.commons.helpers.* + WildcardImport:MyDigitalTimeWidgetProvider.kt$import android.graphics.* + WildcardImport:ReminderActivity.kt$import android.os.* + WildcardImport:ReminderActivity.kt$import org.fossify.clock.extensions.* + WildcardImport:ReminderActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:SelectAlarmDialog.kt$import org.fossify.commons.extensions.* + WildcardImport:SettingsActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:SplashActivity.kt$import org.fossify.clock.helpers.* + WildcardImport:StopwatchFragment.kt$import org.fossify.commons.extensions.* + WildcardImport:TimerAdapter.kt$import org.fossify.commons.extensions.* + WildcardImport:TimerDao.kt$import androidx.room.* + WildcardImport:ViewPagerAdapter.kt$import org.fossify.clock.helpers.* + WildcardImport:WidgetAnalogueConfigureActivity.kt$import org.fossify.commons.extensions.* + WildcardImport:WidgetDigitalConfigureActivity.kt$import org.fossify.commons.extensions.* + + diff --git a/app/lint-baseline.xml b/app/lint-baseline.xml new file mode 100644 index 00000000..1dc92ab9 --- /dev/null +++ b/app/lint-baseline.xml @@ -0,0 +1,1811 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.gradle.kts b/build.gradle.kts index 9a736eea..b7bc0032 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,4 +2,5 @@ plugins { alias(libs.plugins.android).apply(false) alias(libs.plugins.kotlinAndroid).apply(false) alias(libs.plugins.ksp).apply(false) + alias(libs.plugins.detekt).apply(false) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 78118653..2a333cbd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,8 @@ kotlin = "1.9.22" #KSP ksp = "1.9.22-1.0.17" +#Detekt +detekt = "1.23.3" #AndroidX androidx-constraintlayout = "2.1.4" androidx-lifecycle = "2.7.0" @@ -73,3 +75,4 @@ lifecycle = [ android = { id = "com.android.application", version.ref = "gradlePlugins-agp" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } From 310244378bf07a8f2668dd44cf9903231ba420e1 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Tue, 1 Oct 2024 20:12:26 +0530 Subject: [PATCH 047/104] Update image-minimizer.js --- .github/workflows/image-minimizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-minimizer.js b/.github/workflows/image-minimizer.js index 6ec67b57..f81a49e1 100644 --- a/.github/workflows/image-minimizer.js +++ b/.github/workflows/image-minimizer.js @@ -34,7 +34,7 @@ module.exports = async ({github, context}) => { // Regex for finding images (simple variant) ![ALT_TEXT](https://*.githubusercontent.com//.) const REGEX_USER_CONTENT_IMAGE_LOOKUP = /\!\[(.*)\]\((https:\/\/[-a-z0-9]+\.githubusercontent\.com\/\d+\/[-0-9a-f]{32,512}\.(jpg|gif|png))\)/gm; - const REGEX_ASSETS_IMAGE_LOCKUP = /\!\[(.*)\]\((https:\/\/github\.com\/[-\w\d]+\/[-\w\d]+\/assets\/\d+\/[\-0-9a-f]{32,512})\)/gm; + const REGEX_ASSETS_IMAGE_LOCKUP = /\!\[(.*)\]\((https:\/\/github\.com\/user-attachments\/assets\/[\-0-9a-f]{36,})\)/gm; // Check if we found something let foundSimpleImages = REGEX_USER_CONTENT_IMAGE_LOOKUP.test(initialBody) From 0ae24abf0eaa9c83a6cbd83ca605747255f4a3f7 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sat, 26 Oct 2024 03:53:07 +0530 Subject: [PATCH 048/104] Reduce no-response duration to 14 days --- .github/workflows/no-response.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index eef815bd..65ae5a77 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -21,5 +21,5 @@ jobs: with: token: ${{ github.token }} # Number of days of inactivity before an issue is closed for lack of response. - daysUntilClose: 30 + daysUntilClose: 14 responseRequiredLabel: waiting for author From 1a0b7bf7b671f7bcbddb366fd43f590bb5444c64 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 15 Nov 2024 16:56:57 +0530 Subject: [PATCH 049/104] Update no-response.yml --- .github/workflows/no-response.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index 65ae5a77..2b2d329d 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -1,13 +1,9 @@ name: no-response -# Both `issue_comment` and `scheduled` event types are required for this Action -# to work properly. on: - issue_comment: - types: [created] schedule: - # Run daily at midnight. - - cron: '0 0 * * *' + - cron: '0 0 * * *' # Runs daily at midnight + workflow_dispatch: permissions: issues: write @@ -17,9 +13,14 @@ jobs: noResponse: runs-on: ubuntu-latest steps: - - uses: lee-dohm/no-response@v0.5.0 + - uses: actions/stale@v9 with: - token: ${{ github.token }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: -1 # Number of days of inactivity before an issue is closed for lack of response. - daysUntilClose: 14 - responseRequiredLabel: waiting for author + days-before-close: 14 + only-labels: 'waiting for author' + stale-issue-label: 'waiting for author' + stale-pr-label: 'waiting for author' + close-issue-message: This issue has been automatically closed due to inactivity. We requested additional information but have not received a response from the original author. Without the requested details, we cannot proceed. If you have or find the information needed, please comment so we can reopen the issue. + close-pr-message: This pull request has been automatically closed due to inactivity. We requested additional information but have not received a response from the original author. Without the requested details, we cannot proceed. If you have the needed information or updates, please reopen the PR or comment so we can continue the review. From 7e2b4b520b80b870d4a5c929c3b5e4cbc5cf1506 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 17 Nov 2024 22:42:37 +0530 Subject: [PATCH 050/104] Update image minimizer --- .github/workflows/image-minimizer.js | 4 ++-- .github/workflows/image-minimizer.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-minimizer.js b/.github/workflows/image-minimizer.js index f81a49e1..ca4ae10e 100644 --- a/.github/workflows/image-minimizer.js +++ b/.github/workflows/image-minimizer.js @@ -18,7 +18,7 @@ module.exports = async ({github, context}) => { initialBody = context.payload.comment.body; } else if (context.eventName == 'issues') { initialBody = context.payload.issue.body; - } else if (context.eventName == 'pull_request') { + } else if (context.eventName == 'pull_request_target') { initialBody = context.payload.pull_request.body; } else { console.log('Aborting: No body found'); @@ -77,7 +77,7 @@ module.exports = async ({github, context}) => { repo: context.repo.repo, body: newBody }); - } else if (context.eventName == 'pull_request') { + } else if (context.eventName == 'pull_request_target') { console.log('Updating pull request', context.payload.pull_request.number); await github.rest.pulls.update({ pull_number: context.payload.pull_request.number, diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml index d9241c33..a3c1f07e 100644 --- a/.github/workflows/image-minimizer.yml +++ b/.github/workflows/image-minimizer.yml @@ -5,7 +5,7 @@ on: types: [created, edited] issues: types: [opened, edited] - pull_request: + pull_request_target: types: [opened, edited] permissions: From a2abb34bedcbc00de75a7b6b7ef303eb9403fbf2 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 17 Nov 2024 23:19:39 +0530 Subject: [PATCH 051/104] Update image minimizer --- .github/workflows/image-minimizer.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml index a3c1f07e..5e585402 100644 --- a/.github/workflows/image-minimizer.yml +++ b/.github/workflows/image-minimizer.yml @@ -30,6 +30,7 @@ jobs: uses: actions/github-script@v7 timeout-minutes: 3 with: + github-token: ${{ secrets.FOSSIFYBOT_TOKEN }} script: | const script = require('.github/workflows/image-minimizer.js'); await script({github, context}); From 786a5033578969cf4e8d2aeed0bb6353c474b555 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 17 Nov 2024 23:35:08 +0530 Subject: [PATCH 052/104] Update image minimizer --- .github/workflows/image-minimizer.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image-minimizer.yml b/.github/workflows/image-minimizer.yml index 5e585402..5b9e0c03 100644 --- a/.github/workflows/image-minimizer.yml +++ b/.github/workflows/image-minimizer.yml @@ -8,16 +8,14 @@ on: pull_request_target: types: [opened, edited] -permissions: - issues: write - pull-requests: write - jobs: try-minimize: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.FOSSIFYBOT_TOKEN }} - uses: actions/setup-node@v4 with: From 3ce270cd869da857cf53656032c77cea9a69e1f9 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 17 Nov 2024 23:44:46 +0530 Subject: [PATCH 053/104] Update no-response.yml --- .github/workflows/no-response.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index 2b2d329d..7ce741c9 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -5,17 +5,13 @@ on: - cron: '0 0 * * *' # Runs daily at midnight workflow_dispatch: -permissions: - issues: write - pull-requests: write - jobs: noResponse: runs-on: ubuntu-latest steps: - uses: actions/stale@v9 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.FOSSIFYBOT_TOKEN }} days-before-stale: -1 # Number of days of inactivity before an issue is closed for lack of response. days-before-close: 14 From 0907d860e77822d0e66eb856cd2e335169e3b381 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Thu, 18 Jul 2024 22:47:59 +0200 Subject: [PATCH 054/104] Deleted translation using Weblate (Hindi (Hinglish)) --- fastlane/metadata/android/hi@hinglish/title.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 fastlane/metadata/android/hi@hinglish/title.txt diff --git a/fastlane/metadata/android/hi@hinglish/title.txt b/fastlane/metadata/android/hi@hinglish/title.txt deleted file mode 100644 index 16fe316b..00000000 --- a/fastlane/metadata/android/hi@hinglish/title.txt +++ /dev/null @@ -1 +0,0 @@ -Fossify Clock From ba77a4372ac5e2ebc5570b79194c2ddfab0c97f5 Mon Sep 17 00:00:00 2001 From: Fjuro Date: Sat, 27 Jul 2024 14:43:50 +0000 Subject: [PATCH 055/104] Translated using Weblate (Czech) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/cs-CZ/changelogs/1.txt b/fastlane/metadata/android/cs-CZ/changelogs/1.txt index b3f5c161..5096b920 100644 --- a/fastlane/metadata/android/cs-CZ/changelogs/1.txt +++ b/fastlane/metadata/android/cs-CZ/changelogs/1.txt @@ -1 +1 @@ -* Prvotní vydání. +* Initial release. From 2c9e1f4fb610ca055e6e247db50b30ce2a14fb7a Mon Sep 17 00:00:00 2001 From: soldatovaua Date: Sun, 28 Jul 2024 19:08:51 +0000 Subject: [PATCH 056/104] Translated using Weblate (Russian) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ru/ --- app/src/main/res/values-ru/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 37499fbd..05a80537 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -12,10 +12,10 @@ Секундомер остановлен Таймер остановлен Максимальная длительность напоминания - Время вышло + Время истекло Часы и дата Использовать затенение текста - Смахивание вправо — отключить, влево — отложить. + Свайп вправо — отключить, влево — отложить. Порядок создания Время будильника Дата и время будильника @@ -48,5 +48,5 @@ Показывать секунды Нарастание громкости Как я могу изменить сортировку кругов во вкладке секундомера? - Просто нажмите на любую из колонок, и круги отсортируются по этой колонке. Дополнительными нажатиями можно переключаться между сортировкой по возрастанию и по убыванию. - + Просто нажмите на любой из столбцов, и круги отсортируются по этому столбцу. Дополнительными нажатиями можно переключаться между сортировкой по возрастанию и по убыванию. + \ No newline at end of file From c67583bce47be9f5e48d42d5273ab5fb069bb5d6 Mon Sep 17 00:00:00 2001 From: solokot Date: Sun, 28 Jul 2024 19:33:52 +0000 Subject: [PATCH 057/104] Translated using Weblate (Russian) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ru/ --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 05a80537..97411a33 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -15,7 +15,7 @@ Время истекло Часы и дата Использовать затенение текста - Свайп вправо — отключить, влево — отложить. + Смахивание вправо — отключить, влево — отложить. Порядок создания Время будильника Дата и время будильника From 66e10f6d03c2e220481a2e54e883baa4fb5a18a5 Mon Sep 17 00:00:00 2001 From: Mario D'Andrea Date: Tue, 6 Aug 2024 08:57:57 +0000 Subject: [PATCH 058/104] Translated using Weblate (Italian) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/it/ --- fastlane/metadata/android/it-IT/changelogs/1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/it-IT/changelogs/1.txt diff --git a/fastlane/metadata/android/it-IT/changelogs/1.txt b/fastlane/metadata/android/it-IT/changelogs/1.txt new file mode 100644 index 00000000..b92e4cc4 --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/1.txt @@ -0,0 +1 @@ +* Versione iniziale. From 51c37f0c2624eeea26906ce2b8ff02ed9b7a202b Mon Sep 17 00:00:00 2001 From: Sketch6580 Date: Tue, 20 Aug 2024 04:44:17 +0000 Subject: [PATCH 059/104] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/zh_Hans/ --- app/src/main/res/values-zh-rCN/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8101f61f..af3eb57d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -2,7 +2,7 @@ 时钟 时区 - 震动 + 振动 未选择哪一天 时钟 定时器 @@ -46,4 +46,4 @@ 音量渐增 秒表页面分段的排序如何更改? 只要点击任一栏位,就会依据选定的栏位做排序。再多点一下,还能切换递增或者递减顺序。 - + \ No newline at end of file From f81ed4e08cd9b3ac3af848b1e2c1bf6bacd878b0 Mon Sep 17 00:00:00 2001 From: Sketch6580 Date: Tue, 20 Aug 2024 05:56:18 +0000 Subject: [PATCH 060/104] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hans/ --- .../metadata/android/zh-CN/changelogs/1.txt | 1 + .../android/zh-CN/full_description.txt | 32 +++++++++++++++++++ .../android/zh-CN/short_description.txt | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/zh-CN/changelogs/1.txt create mode 100644 fastlane/metadata/android/zh-CN/full_description.txt diff --git a/fastlane/metadata/android/zh-CN/changelogs/1.txt b/fastlane/metadata/android/zh-CN/changelogs/1.txt new file mode 100644 index 00000000..f9ea6237 --- /dev/null +++ b/fastlane/metadata/android/zh-CN/changelogs/1.txt @@ -0,0 +1 @@ +* 首次发布。 diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt new file mode 100644 index 00000000..6dd4497c --- /dev/null +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -0,0 +1,32 @@ +介绍 Fossify 时钟 – 终极计时伴侣,旨在改善您的日常生活,促进更好的睡眠习惯。Fossify 时钟根据您的需求量身定制了多种功能,无缝融入您的生活,提供无与伦比的便利性和多功能性。 + +⌚ 多功能计时: +使用 Fossify 时钟体验多功能时间管理的强大功能。从时钟小部件到闹钟和秒表,这款应用是您调节日常活动和改善整体生活方式的首选工具。 + +⏰ 功能丰富的闹钟: +Fossify 时钟的全面闹钟功能让您醒来时神清气爽。通过日期选择、振动切换、自定义标签和铃声自定义等选项设置多个闹钟。享受逐渐增加的音量和可定制的贪睡按钮,以获得愉快的清醒体验。凭借用户友好的界面,设置闹钟从未如此简单。 + +⏱️ 方便的秒表: +使用 Fossify 时钟的秒表功能精确跟踪您的活动。轻松测量更长的时间或单独的圈数。您还可以按升序或降序对圈数进行排序。 + +⏳ 精确计时器功能: +使用 Fossify 时钟的多功能计时器功能,随时掌握您的任务。自定义铃声首选项、切换振动和暂停倒计时,以满足您的需求。无论您是在计时烹饪间隔、管理学习课程,还是确保及时休息,Fossify 时钟都能精准而轻松地为您服务。 + +🌈 具有可自定义功能的时钟小部件: +使用 Fossify 时钟的可自定义时钟小部件改变您的主屏幕。调整文本颜色、背景颜色和透明度。在模拟或数字时钟之间进行选择,以适应您的风格,并轻松访问重要的时间信息。 + +🎨 可自定义的界面和主题: +Fossify 时钟的 Material 设计和深色主题选项,为您带来个性化体验。使用可自定义的颜色和主题根据您的喜好定制应用,增强可用性并减少眼睛疲劳,尤其是在弱光环境中。 + +🔒 隐私第一的方法: +请放心,Fossify 时钟的离线操作会保护您的隐私。在不牺牲功能或便利性的情况下,体验最大的隐私、安全性和稳定性。 + +🌐 无广告和开源: +告别侵入性广告和不必要的权限。Fossify 时钟无广告,完全开源,让您完全控制自己的计时体验。 + +使用 Fossify 时钟提升您的时间管理技能,优化您的日常生活,并优先考虑更好的睡眠。立即下载,以前所未有的方式掌控您的时间。 + +探索更多 Fossify 应用:https://www.fossify.org +开源代码:https://www.github.com/FossifyOrg +加入 Reddit 社区:https://www.reddit.com/r/Fossify +在 Telegram 上联系:https://t.me/Fossify diff --git a/fastlane/metadata/android/zh-CN/short_description.txt b/fastlane/metadata/android/zh-CN/short_description.txt index cfb16597..ce4872c4 100644 --- a/fastlane/metadata/android/zh-CN/short_description.txt +++ b/fastlane/metadata/android/zh-CN/short_description.txt @@ -1 +1 @@ -趁手、轻量、开源的时钟应用,具有必要的功能。 +便捷、轻量的开源时钟应用,具有基本功能。 From 917865706b111095a7b14c995ca319f8226aac7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B5?= Date: Mon, 26 Aug 2024 07:57:06 +0000 Subject: [PATCH 061/104] Translated using Weblate (Chinese (Traditional)) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hant/ --- fastlane/metadata/android/zh-TW/title.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/zh-TW/title.txt diff --git a/fastlane/metadata/android/zh-TW/title.txt b/fastlane/metadata/android/zh-TW/title.txt new file mode 100644 index 00000000..b8866a9b --- /dev/null +++ b/fastlane/metadata/android/zh-TW/title.txt @@ -0,0 +1 @@ +Fossify 時鐘 From d0f10ac2d73169dd5c9bf18f5c4b8c14c539f0fa Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Fri, 30 Aug 2024 16:20:49 +0000 Subject: [PATCH 062/104] Translated using Weblate (Croatian) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/hr/ --- app/src/main/res/values-hr/strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 4b1a5b91..a167bf85 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -47,4 +47,5 @@ Odaberi alarm za odbacivanje Alarm je stvoren Odaberi timer za odbacivanje - + Timer + \ No newline at end of file From d170abe52f37d25ebff3ba73c8a618bb9e65a4c0 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 6 Sep 2024 02:45:47 +0000 Subject: [PATCH 063/104] Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hant/ --- fastlane/metadata/android/zh-TW/changelogs/1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/zh-TW/changelogs/1.txt diff --git a/fastlane/metadata/android/zh-TW/changelogs/1.txt b/fastlane/metadata/android/zh-TW/changelogs/1.txt new file mode 100644 index 00000000..2abfe4a1 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/1.txt @@ -0,0 +1 @@ +* 初始版本。 From 5423a8bd8dea6226bb5afccdf3dc79fa12f781f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Marques?= Date: Thu, 12 Sep 2024 23:08:57 +0000 Subject: [PATCH 064/104] Translated using Weblate (Portuguese) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/pt/ --- app/src/main/res/values-pt/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index ad463d37..e932be74 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -37,7 +37,7 @@ %d temporizador em curso %d temporizadores em curso - %d temporizadores em curso + Relógio Alarme @@ -48,4 +48,4 @@ Como posso alterar a ordem das voltas no Cronómetro\? Basta clicar em qualquer uma das colunas e isso fará com que as voltas sejam ordenadas pela coluna especificada. Com cliques adicionais, pode alternar a ordem de entre crescente e decrescente. Descartar alarme cedo - + \ No newline at end of file From 555d5e87891e12d28b60e746bcf28098360d383d Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 19 Sep 2024 13:54:05 +0000 Subject: [PATCH 065/104] Translated using Weblate (Japanese) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ja/ --- app/src/main/res/values-ja/strings.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 483b6c2d..545e818c 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -18,17 +18,17 @@ 曜日とアラーム時刻 アナログ時計 デジタル時計 - アラームが破棄されました + アラームを消去しました アラームが見つかりません アラームを追加 タイマーが見つかりません タイマーを追加 今後のアラーム - タイマーが作動中 - タイマー %s が作動中 + タイマーが作動しています + タイマー %s が作動しています 新しいタイマー - %d 個のタイマーが作動中 + %d個のタイマーが作動しています 時計 アラーム @@ -38,4 +38,12 @@ 音量を徐々に大きくする ストップウォッチのタブでラップタイムの並べ替えを行うにはどうすればよいですか? 特定の列をタップすると、その列でラップタイムが並べ替えられます。さらにもう一度タップすると、昇順と降順の切り替えを行えます。 - + 時計 + ストップウォッチ + ストップウォッチを開始 + 消去するアラームを選択してください + アラームを作成しました + %sまでスヌーズ中のアラーム + アラームを事前に消去 + 消去するタイマーを選択してください + \ No newline at end of file From cc6f125b5a51c700fe29aa86e0267cd081525167 Mon Sep 17 00:00:00 2001 From: fincent Date: Thu, 19 Sep 2024 11:21:11 +0000 Subject: [PATCH 066/104] Translated using Weblate (Dutch) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/nl/ --- app/src/main/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 42c6262a..248025a7 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -13,7 +13,7 @@ Tijd verstreken Klok en datum Tekstschaduw gebruiken - Veeg naar rechts voor uitzetten, of naar links voor uitstellen. + Veeg naar rechts om te sluiten, of naar links om te sluimeren. Aanmaakvolgorde Wektijd Dag en tijd From 744f79900a4aebe19b6fb2d344eb7c6b9ff51618 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 19 Sep 2024 10:43:30 +0000 Subject: [PATCH 067/104] Translated using Weblate (Japanese) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/ja/ --- fastlane/metadata/android/ja-JP/changelogs/1.txt | 1 + fastlane/metadata/android/ja-JP/title.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/ja-JP/changelogs/1.txt create mode 100644 fastlane/metadata/android/ja-JP/title.txt diff --git a/fastlane/metadata/android/ja-JP/changelogs/1.txt b/fastlane/metadata/android/ja-JP/changelogs/1.txt new file mode 100644 index 00000000..4910713f --- /dev/null +++ b/fastlane/metadata/android/ja-JP/changelogs/1.txt @@ -0,0 +1 @@ +* 初公開。 diff --git a/fastlane/metadata/android/ja-JP/title.txt b/fastlane/metadata/android/ja-JP/title.txt new file mode 100644 index 00000000..21c4323e --- /dev/null +++ b/fastlane/metadata/android/ja-JP/title.txt @@ -0,0 +1 @@ +Fossify時計 From a53ffc7ca7263387fbed5b73a693f3c9c6f66e95 Mon Sep 17 00:00:00 2001 From: Sketch6580 Date: Thu, 19 Sep 2024 12:40:50 +0000 Subject: [PATCH 068/104] Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hans/ --- fastlane/metadata/android/zh-CN/full_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index 6dd4497c..d0733081 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -1,4 +1,4 @@ -介绍 Fossify 时钟 – 终极计时伴侣,旨在改善您的日常生活,促进更好的睡眠习惯。Fossify 时钟根据您的需求量身定制了多种功能,无缝融入您的生活,提供无与伦比的便利性和多功能性。 +隆重推出 Fossify 时钟——终极计时伴侣,旨在改善您的日常生活,促进更好的睡眠习惯。Fossify 时钟根据您的需求量身定制了多种功能,无缝融入您的生活,提供无与伦比的便利性和多功能性。 ⌚ 多功能计时: 使用 Fossify 时钟体验多功能时间管理的强大功能。从时钟小部件到闹钟和秒表,这款应用是您调节日常活动和改善整体生活方式的首选工具。 From 00cd949b3f102eccf7d52db499d0148bd72a319b Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 23 Sep 2024 03:36:39 +0000 Subject: [PATCH 069/104] Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/zh_Hant/ --- app/src/main/res/values-zh-rTW/strings.xml | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 30be952a..2fb366e7 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1,6 +1,6 @@ - 簡易時鐘 + 時鐘 時區 震動 未選擇哪一天 @@ -21,4 +21,29 @@ 音量漸增 碼錶頁面分段的排序如何變更? 只要點擊任一欄位,就會依選定的欄位做排序。再多點一下,還能切換遞增或遞減的排序。 - + 提早解除鬧鐘 + 時鐘 + 計時器 + 開始計時 + 解除鬧鐘 + 選取要解除的計時器 + 選取要解除的鬧鐘 + 已建立鬧鐘 + 鬧鐘被 %s 以貪睡延後 + 找不到鬧鐘 + 新增鬧鐘 + 找不到計時器 + 新增計時器 + 即將到來的鬧鐘 + 計時器正在運作 + %s 的計時器正在運作 + 新的計時器 + + %d 個計時器正在運作 + + 建立順序 + 鬧鐘時間 + 日期與鬧鐘時間 + 類比時鐘 + 數位時鐘 + \ No newline at end of file From 2c2b1cd76189e8e144f6939b4b574e6deac37548 Mon Sep 17 00:00:00 2001 From: Sketch6580 Date: Sun, 20 Oct 2024 03:02:21 +0000 Subject: [PATCH 070/104] Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hans/ --- fastlane/metadata/android/zh-CN/full_description.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index d0733081..1607c2a0 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -1,7 +1,7 @@ 隆重推出 Fossify 时钟——终极计时伴侣,旨在改善您的日常生活,促进更好的睡眠习惯。Fossify 时钟根据您的需求量身定制了多种功能,无缝融入您的生活,提供无与伦比的便利性和多功能性。 ⌚ 多功能计时: -使用 Fossify 时钟体验多功能时间管理的强大功能。从时钟小部件到闹钟和秒表,这款应用是您调节日常活动和改善整体生活方式的首选工具。 +使用 Fossify 时钟体验多功能时间管理的强大功能。从时钟微件到闹钟和秒表,这款应用是您调节日常活动和改善整体生活方式的首选工具。 ⏰ 功能丰富的闹钟: Fossify 时钟的全面闹钟功能让您醒来时神清气爽。通过日期选择、振动切换、自定义标签和铃声自定义等选项设置多个闹钟。享受逐渐增加的音量和可定制的贪睡按钮,以获得愉快的清醒体验。凭借用户友好的界面,设置闹钟从未如此简单。 @@ -12,8 +12,8 @@ Fossify 时钟的全面闹钟功能让您醒来时神清气爽。通过日期选 ⏳ 精确计时器功能: 使用 Fossify 时钟的多功能计时器功能,随时掌握您的任务。自定义铃声首选项、切换振动和暂停倒计时,以满足您的需求。无论您是在计时烹饪间隔、管理学习课程,还是确保及时休息,Fossify 时钟都能精准而轻松地为您服务。 -🌈 具有可自定义功能的时钟小部件: -使用 Fossify 时钟的可自定义时钟小部件改变您的主屏幕。调整文本颜色、背景颜色和透明度。在模拟或数字时钟之间进行选择,以适应您的风格,并轻松访问重要的时间信息。 +🌈 具有可自定义功能的时钟微件: +使用 Fossify 时钟的可自定义时钟微件改变您的主屏幕。调整文本颜色、背景颜色和透明度。在模拟或数字时钟之间进行选择,以适应您的风格,并轻松访问重要的时间信息。 🎨 可自定义的界面和主题: Fossify 时钟的 Material 设计和深色主题选项,为您带来个性化体验。使用可自定义的颜色和主题根据您的喜好定制应用,增强可用性并减少眼睛疲劳,尤其是在弱光环境中。 From dc9822e42247baabab7e4e978178ddad7f288dfe Mon Sep 17 00:00:00 2001 From: cwpute Date: Tue, 22 Oct 2024 14:19:52 +0000 Subject: [PATCH 071/104] Translated using Weblate (French) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/fr/ --- fastlane/metadata/android/fr-FR/changelogs/1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/fr-FR/changelogs/1.txt b/fastlane/metadata/android/fr-FR/changelogs/1.txt index ea921cd5..4d701553 100644 --- a/fastlane/metadata/android/fr-FR/changelogs/1.txt +++ b/fastlane/metadata/android/fr-FR/changelogs/1.txt @@ -1 +1 @@ -* Première version. +* Première parution. From 8d27908c22fdc7033c9149b7b4330573a1f61a3e Mon Sep 17 00:00:00 2001 From: Fjuro Date: Sat, 26 Oct 2024 08:24:32 +0000 Subject: [PATCH 072/104] Translated using Weblate (Czech) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/cs-CZ/changelogs/1.txt b/fastlane/metadata/android/cs-CZ/changelogs/1.txt index 5096b920..b3f5c161 100644 --- a/fastlane/metadata/android/cs-CZ/changelogs/1.txt +++ b/fastlane/metadata/android/cs-CZ/changelogs/1.txt @@ -1 +1 @@ -* Initial release. +* Prvotní vydání. From 516cb7791eb1ee9b01f60c4009ff49f966837cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jos=C3=A9=20m?= Date: Mon, 28 Oct 2024 08:02:43 +0000 Subject: [PATCH 073/104] Translated using Weblate (Galician) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/gl/ --- fastlane/metadata/android/gl-ES/changelogs/1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/gl-ES/changelogs/1.txt diff --git a/fastlane/metadata/android/gl-ES/changelogs/1.txt b/fastlane/metadata/android/gl-ES/changelogs/1.txt new file mode 100644 index 00000000..a1f6c8d3 --- /dev/null +++ b/fastlane/metadata/android/gl-ES/changelogs/1.txt @@ -0,0 +1 @@ +* Versión inicial. From 47afb4091c688846e6a155ffb3b8a14f0e1f8a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Poisson?= Date: Sun, 27 Oct 2024 21:46:30 +0000 Subject: [PATCH 074/104] Translated using Weblate (French) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/fr/ --- fastlane/metadata/android/fr-FR/short_description.txt | 2 +- fastlane/metadata/android/fr-FR/title.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/fr-FR/title.txt diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt index 239168d9..ae14482f 100644 --- a/fastlane/metadata/android/fr-FR/short_description.txt +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -1 +1 @@ -Application horloge pratique, légère et open source avec des fonctionnalités essentielles. +Application horloge pratique, légère et open source avec les fonctionnalités essentielles. diff --git a/fastlane/metadata/android/fr-FR/title.txt b/fastlane/metadata/android/fr-FR/title.txt new file mode 100644 index 00000000..63100bc3 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/title.txt @@ -0,0 +1 @@ +Fossify Horloge From 01c99c034952a57c72ddd25aa1df701417883ea1 Mon Sep 17 00:00:00 2001 From: Tom Coutte Date: Wed, 30 Oct 2024 14:48:03 +0000 Subject: [PATCH 075/104] Translated using Weblate (French) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/fr/ --- .../android/fr-FR/full_description.txt | 32 +++++++++++++++++++ .../android/fr-FR/short_description.txt | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/fr-FR/full_description.txt diff --git a/fastlane/metadata/android/fr-FR/full_description.txt b/fastlane/metadata/android/fr-FR/full_description.txt new file mode 100644 index 00000000..214d9cc1 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/full_description.txt @@ -0,0 +1,32 @@ +Présentation de l'Horloge Fossify – l'ultime compagnon du temps, conçu pour enrichir vos routines quotidiennes et de promouvoir de meilleures habitudes de sommeil. Avec une multitude de fonctionnalités faite pour vos besoins, l'Horloge Fossify s'intègre dans votre vie, offrant un confort et une polyvalence inégalés. + +⌚ CHRONOMÈTRE MULTIFONCTION : +Découvrez la puissance de la gestion du temps polyvalente avec l'Horloge Fossify. Que ce soit pour servir de widget ou pour fonctionner comme un réveil et un chronomètre, cette application est l'outil idéal pour réguler vos activités quotidiennes et améliorer votre mode de vie global. + +⏰ ALARME RICHE EN FONCTIONNALITÉS : +Réveillez-vous en pleine forme grâce aux fonctions d'alarme complètes de l'Horloge Fossify. Réglez plusieurs alarmes avec des options telles que la sélection du jour, la vibration, les étiquettes personnalisées et la personnalisation de la sonnerie. Profitez d'une augmentation progressive du volume et d'un bouton de répétition personnalisable pour une expérience de réveil agréable. Grâce à une interface conviviale, il n'a jamais été aussi facile de régler des alarmes. + +⏱️ CHRONOMÈTRE PRATIQUE : +Enregistrez vos activités avec précision en utilisant la fonctionnalité chronomètre de l'Horloge Fossify. Mesurez de longues périodes ou des tours, sans efforts. Vous pouvez aussi trier vos tours dans l'ordre ascendant ou descendant. + +⏳ FONCTIONNALITÉ DE MINUTERIE PRÉCISE : +Restez au top de vos tâches grâce à la fonction polyvalente de minuterie de l'Horloge Fossify. Personnalisez vos sonneries, activez les vibrations et mettez en pause les minuteurs en fonction de vos besoins. Que vous chronométriez des intervalles de cuisson, gériez des sessions d'étude ou assuriez des pauses opportunes, l'Horloge Fossify vous couvre avec précision et facilité. + +🌈 WIDGET HORLOGE AVEC FONCTIONS PERSONNALISABLES : +Transformez votre écran d'accueil avec le widget horloge personnalisable de l'Horloge Fossify. Ajustez la couleur du texte, la couleur de fond et la transparence. Choisissez entre une horloge analogique ou numérique selon votre style et accédez facilement aux informations essentielles en un coup d'œil. + +🎨 INTERFACE ET THÈMES PERSONNALISABLES : +Profitez d'une expérience personnalisée grâce au design matériel et aux options de thème sombre de l'Horloge Fossify. Adaptez l'application à vos préférences avec des couleurs et des thèmes personnalisables, en améliorant la convivialité et en réduisant la fatigue oculaire, en particulier dans les environnements à faible luminosité. + +🔒 UNE APPROCHE AXÉE SUR LA PROTECTION DE LA VIE PRIVÉE : +Soyez rassuré en sachant que votre vie privée est protégée grâce au fonctionnement hors ligne de l'Horloge Fossify. Faites l'expérience d'une confidentialité, d'une sécurité et d'une stabilité maximales sans sacrifier fonctionnalités ou confort. + +🌐 SANS PUBS & OPEN-SOURCE : +Dites adieu aux publicités intrusives et aux autorisations inutiles. L'Horloge Fossify est sans publicité, entièrement open-source, et vous accorde un contrôle total sur votre chronomètre. + +Améliorez vos compétences dans la gestion du temps, optimisez vos routines et donnez la priorité à un meilleur sommeil avec l'Horloge Fossify. Téléchargez maintenant et prenez le contrôle de votre temps comme jamais auparavant. + +Explorez plus d'applications Fossify: https://www.fossify.org +Code Open-Source : https://www.github.com/FossifyOrg +Rejoignez la communauté sur Reddit : https://www.reddit.com/r/Fossify +Restez connecté sur Telegram : https://t.me/Fossify diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt index ae14482f..63d74e4b 100644 --- a/fastlane/metadata/android/fr-FR/short_description.txt +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -1 +1 @@ -Application horloge pratique, légère et open source avec les fonctionnalités essentielles. +Application horloge pratique, légère et open source avec leurs fonctionnalités essentielles. From 33e1202fbb05fcb88e47f9750bed7e62fde3004b Mon Sep 17 00:00:00 2001 From: Sergio Marques Date: Thu, 31 Oct 2024 22:05:04 +0000 Subject: [PATCH 076/104] Translated using Weblate (Portuguese) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/pt/ --- app/src/main/res/values-pt/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index e932be74..4e44383c 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -37,7 +37,7 @@ %d temporizador em curso %d temporizadores em curso - + %d temporizadores em curso Relógio Alarme From 157e975c409b9cd138730e873ca4929b97985c15 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Sat, 9 Nov 2024 19:04:20 +0000 Subject: [PATCH 077/104] Translated using Weblate (Portuguese (Brazil)) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/pt_BR/ --- fastlane/metadata/android/pt-BR/changelogs/1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/pt-BR/changelogs/1.txt b/fastlane/metadata/android/pt-BR/changelogs/1.txt index 01644058..de7e2be2 100644 --- a/fastlane/metadata/android/pt-BR/changelogs/1.txt +++ b/fastlane/metadata/android/pt-BR/changelogs/1.txt @@ -1 +1 @@ -* Lançamento inicial. +* Versão inicial. From 1c04d931b72393cb494bb3df6edc7e147d426c0a Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 13 Nov 2024 18:25:03 +0000 Subject: [PATCH 078/104] Translated using Weblate (Ukrainian) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/uk/ --- fastlane/metadata/android/uk/changelogs/1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/uk/changelogs/1.txt b/fastlane/metadata/android/uk/changelogs/1.txt index 8ae0c5b0..96f3b04c 100644 --- a/fastlane/metadata/android/uk/changelogs/1.txt +++ b/fastlane/metadata/android/uk/changelogs/1.txt @@ -1 +1 @@ -* Початковий реліз. +* Початковий випуск. From 19898c04ee5e5d9ec99b2ae9221ebcc46fd54bf0 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 14 Nov 2024 21:50:17 +0000 Subject: [PATCH 079/104] Translated using Weblate (Dutch) Currently translated at 50.0% (2 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/nl/ --- fastlane/metadata/android/nl-NL/short_description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/nl-NL/short_description.txt b/fastlane/metadata/android/nl-NL/short_description.txt index cb974679..0ed67b3b 100644 --- a/fastlane/metadata/android/nl-NL/short_description.txt +++ b/fastlane/metadata/android/nl-NL/short_description.txt @@ -1 +1 @@ -Handige, lichtgewicht, open-source klok-app met alle essentiële functies. +Handige, lichtgewicht opensource klok met alle essentiële functies. From 57cb9a6de23ca611eb400f151c6cc73b3249b277 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Thu, 14 Nov 2024 19:17:06 +0000 Subject: [PATCH 080/104] Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 75.0% (3 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/zh_Hant/ --- fastlane/metadata/android/zh-TW/short_description.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 fastlane/metadata/android/zh-TW/short_description.txt diff --git a/fastlane/metadata/android/zh-TW/short_description.txt b/fastlane/metadata/android/zh-TW/short_description.txt new file mode 100644 index 00000000..196ebab7 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/short_description.txt @@ -0,0 +1 @@ +一款輕巧、開源的時鐘應用程式,提供你所需的基本功能。 From 19d9dcab2f08de87c34c936eb1c2ae809f1f0321 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Mon, 18 Nov 2024 12:21:36 +0530 Subject: [PATCH 081/104] Update no-response.yml --- .github/workflows/no-response.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index 7ce741c9..0eaf9af8 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -18,5 +18,7 @@ jobs: only-labels: 'waiting for author' stale-issue-label: 'waiting for author' stale-pr-label: 'waiting for author' + remove-stale-when-updated: false + ignore-updates: true close-issue-message: This issue has been automatically closed due to inactivity. We requested additional information but have not received a response from the original author. Without the requested details, we cannot proceed. If you have or find the information needed, please comment so we can reopen the issue. close-pr-message: This pull request has been automatically closed due to inactivity. We requested additional information but have not received a response from the original author. Without the requested details, we cannot proceed. If you have the needed information or updates, please reopen the PR or comment so we can continue the review. From 9028c6cf15f1926532d183ff403c21a2b0b6ffa1 Mon Sep 17 00:00:00 2001 From: Linerly Date: Wed, 27 Nov 2024 11:59:38 +0000 Subject: [PATCH 082/104] Translated using Weblate (Indonesian) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/id/ --- .../metadata/android/id/full_description.txt | 32 +++++++++++++++++++ .../metadata/android/id/short_description.txt | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/id/full_description.txt diff --git a/fastlane/metadata/android/id/full_description.txt b/fastlane/metadata/android/id/full_description.txt new file mode 100644 index 00000000..a0d74ac8 --- /dev/null +++ b/fastlane/metadata/android/id/full_description.txt @@ -0,0 +1,32 @@ +Memperkenalkan Fossify Clock – pendamping penunjuk waktu terbaik yang dirancang untuk menyempurnakan rutinitas harian Anda dan meningkatkan kebiasaan tidur yang lebih baik. Dengan berbagai fungsi yang disesuaikan dengan kebutuhan Anda, Fossify Clock terintegrasi dengan mulus ke dalam kehidupan Anda, menawarkan kemudahan dan fleksibilitas yang tak tertandingi. + +⌚ PENCATATAN WAKTU MULTIFUNGSI: +Rasakan kekuatan manajemen waktu yang serbaguna dengan Fossify Clock. Dari berfungsi sebagai widget jam hingga berfungsi sebagai jam alarm dan stopwatch, aplikasi ini adalah alat yang tepat untuk mengatur aktivitas harian Anda dan meningkatkan gaya hidup Anda secara keseluruhan. + +⏰ ALARM YANG KAYA FITUR: +Bangun dengan segar dengan fitur alarm Fossify Clock yang komprehensif. Atur beberapa alarm dengan opsi seperti pemilihan hari, sakelar getar, label khusus, dan kustomisasi nada dering. Nikmati peningkatan volume secara bertahap dan tombol tunda yang dapat disesuaikan untuk pengalaman bangun yang menyenangkan. Dengan antarmuka yang ramah pengguna, mengatur alarm tidak pernah semudah ini. + +⏱️ STOPWATCH YANG NYAMAN: +Lacak aktivitas Anda dengan presisi menggunakan fungsi stopwatch Fossify Clock. Ukur periode yang lebih lama atau putaran individual dengan mudah. Anda juga dapat mengurutkan putaran Anda dalam urutan menaik atau menurun. + +⏳ FUNGSI PENGATUR WAKTU YANG TEPAT: +Tetaplah fokus pada tugas Anda dengan fitur pengatur waktu serbaguna Fossify Clock. Sesuaikan preferensi nada dering, alihkan getaran, dan jeda hitung mundur sesuai kebutuhan Anda. Baik Anda mengatur waktu memasak, mengatur sesi belajar, atau memastikan waktu istirahat tepat waktu, Fossify Clock siap membantu Anda dengan presisi dan mudah. + +🌈 WIDGET JAM DENGAN FITUR YANG DAPAT DISESUAIKAN: +Ubah layar beranda Anda dengan widget jam Fossify Clock yang dapat disesuaikan. Sesuaikan warna teks, warna latar belakang, dan transparansi. Pilih antara jam analog atau digital yang sesuai dengan gaya Anda dan akses informasi waktu penting dengan mudah dalam sekejap. + +🎨 ANTARMUKA DAN TEMA YANG DAPAT DISESUAIKAN: +Nikmati pengalaman yang dipersonalisasi dengan desain material dan opsi tema gelap Fossify Clock. Sesuaikan aplikasi dengan preferensi Anda dengan warna dan tema yang dapat disesuaikan, yang meningkatkan kegunaan dan mengurangi ketegangan mata, terutama di lingkungan dengan cahaya redup. + +🔒 PENDEKATAN YANG MENGUTAMAKAN PRIVASI: +Yakinlah bahwa privasi Anda terlindungi dengan operasi offline Fossify Clock. Rasakan privasi, keamanan, dan stabilitas maksimum tanpa mengorbankan fungsionalitas atau kenyamanan. + +🌐 BEBAS IKLAN & BERSUMBER TERBUKA: +Ucapkan selamat tinggal pada iklan yang mengganggu dan izin yang tidak perlu. Fossify Clock bebas iklan, sepenuhnya open-source, dan memberi Anda kendali penuh atas pengalaman pencatatan waktu Anda. + +Tingkatkan keterampilan manajemen waktu Anda, optimalkan rutinitas Anda, dan prioritaskan tidur yang lebih baik dengan Fossify Clock. Unduh sekarang dan kendalikan waktu Anda seperti yang belum pernah terjadi sebelumnya. + +Jelajahi lebih banyak aplikasi Fossify: https://www.fossify.org +Kode Sumber Terbuka: https://www.github.com/FossifyOrg +Bergabunglah dengan komunitas di Reddit: https://www.reddit.com/r/Fossify +Terhubung di Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/id/short_description.txt b/fastlane/metadata/android/id/short_description.txt index 00c6c4a7..499fccde 100644 --- a/fastlane/metadata/android/id/short_description.txt +++ b/fastlane/metadata/android/id/short_description.txt @@ -1 +1 @@ -Kombinasi widget jam yang indah, jam alarm, stopwatch, pengatur waktu +Aplikasi jam yang praktis, ringan, bersumber terbuka dengan fitur-fitur penting. From 494d1d819379bf3995a4a1304177781cfffa0f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aindri=C3=BA=20Mac=20Giolla=20Eoin?= Date: Sat, 30 Nov 2024 12:06:17 +0100 Subject: [PATCH 083/104] Added translation using Weblate (Irish) --- app/src/main/res/values-ga/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-ga/strings.xml diff --git a/app/src/main/res/values-ga/strings.xml b/app/src/main/res/values-ga/strings.xml new file mode 100644 index 00000000..a6b3daec --- /dev/null +++ b/app/src/main/res/values-ga/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From bfed75b067f27ecec0ef4834dcf16a9930cbc350 Mon Sep 17 00:00:00 2001 From: 109247019824 Date: Sat, 30 Nov 2024 14:54:12 +0000 Subject: [PATCH 084/104] Translated using Weblate (Bulgarian) Currently translated at 25.0% (1 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/bg/ --- fastlane/metadata/android/bg/title.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/bg/title.txt b/fastlane/metadata/android/bg/title.txt index 1a90cff7..16fe316b 100644 --- a/fastlane/metadata/android/bg/title.txt +++ b/fastlane/metadata/android/bg/title.txt @@ -1 +1 @@ -Фосифай Часовник +Fossify Clock From 56768e02dc8041515d0854508ffd42af8ffa5aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aindri=C3=BA=20Mac=20Giolla=20Eoin?= Date: Sat, 30 Nov 2024 11:09:12 +0000 Subject: [PATCH 085/104] Translated using Weblate (Irish) Currently translated at 100.0% (4 of 4 strings) Translation: Fossify/Clock metadata Translate-URL: https://hosted.weblate.org/projects/fossify/clock-metadata/ga/ --- fastlane/metadata/android/ga/changelogs/1.txt | 1 + .../metadata/android/ga/full_description.txt | 32 +++++++++++++++++++ .../metadata/android/ga/short_description.txt | 1 + fastlane/metadata/android/ga/title.txt | 1 + 4 files changed, 35 insertions(+) create mode 100644 fastlane/metadata/android/ga/changelogs/1.txt create mode 100644 fastlane/metadata/android/ga/full_description.txt create mode 100644 fastlane/metadata/android/ga/short_description.txt create mode 100644 fastlane/metadata/android/ga/title.txt diff --git a/fastlane/metadata/android/ga/changelogs/1.txt b/fastlane/metadata/android/ga/changelogs/1.txt new file mode 100644 index 00000000..2889c5cc --- /dev/null +++ b/fastlane/metadata/android/ga/changelogs/1.txt @@ -0,0 +1 @@ +* Eisiúint tosaigh. diff --git a/fastlane/metadata/android/ga/full_description.txt b/fastlane/metadata/android/ga/full_description.txt new file mode 100644 index 00000000..4b442513 --- /dev/null +++ b/fastlane/metadata/android/ga/full_description.txt @@ -0,0 +1,32 @@ +Clog Fossify a thabhairt isteach – an compánach deiridh ama atá deartha chun do ghnáthaimh laethúla a fheabhsú agus nósanna codlata níos fearr a chur chun cinn. Agus an iliomad feidhmeanna curtha in oiriúint le do chuid riachtanas, comhtháthaíonn Fossify Clock gan uaim isteach i do shaol, ag tairiscint áise agus solúbthachta gan sárú. + +⌚ COINNEÁIL ILfheidhmeach: +Taithí a dhéanamh ar chumhacht na bainistíochta ama ildánach le Fossify Clog. Ó fónamh mar ghiuirléid cloig go feidhmiú mar chlog aláraim agus stopuaireadóir, is é an aip seo an uirlis chun do ghníomhaíochtaí laethúla a rialú agus chun do stíl mhaireachtála iomlán a fheabhsú. + +⏰ ALARM Saibhir Gné: +Múscail athnuachan le gnéithe cuimsitheacha aláraim Fossify Clock. Socraigh il-aláraim le roghanna amhail roghnú lae, scorán creathadh, lipéid shaincheaptha agus saincheapadh cloigíní. Bain sult as méadú de réir a chéile ar an toirt agus cnaipe snooze inoiriúnaithe le haghaidh eispéireas taitneamhach múscailte. Le comhéadan atá éasca le húsáid, ní raibh sé riamh níos éasca aláraim a shocrú. + +⏱️ STOPWATCH Áisiúil: +Rianaigh do ghníomhaíochtaí go beacht trí úsáid a bhaint as feidhm stopuaireadóir Fossify Clock. Déan tréimhsí níos faide nó lapaí aonair a thomhas gan stró. Is féidir leat freisin do laps a shórtáil in ord ardaitheach nó íslitheach. + +⏳ FEIDHMÍOCHT AMA BEACHT: +Fan ar bharr do thascanna leis an ngné lasc ama ildánach Fossify Clock. Saincheap roghanna glúnta, scoránaigh creathadh, agus sos comhaireamh síos chun freastal ar do chuid riachtanas. Cibé an bhfuil tú ag uainiú tréimhsí cócaireachta, ag bainistiú seisiúin staidéir, nó ag cinntiú sosanna tráthúla, tá Fossify Clock clúdaithe agat le cruinneas agus gan stró. + +🌈 Giuirléid CLOCK LE GNÉITHE CUSPÓIRÍ +Trasfhoirmigh do scáileán baile leis an ngiuirléid clog Inoiriúnaithe Fossify Clock. Coigeartaigh dath an téacs, dath cúlra, agus trédhearcacht. Roghnaigh idir chlog analógach nó clog digiteach a oireann le do stíl agus faigh sracfhéachaint ar eolas riachtanach ama. + +🎨 IDIRGHNÍOMHA AGUS TÉAMAÍ CUSTAIMÉADACHA: +Bain sult as taithí phearsantaithe le dearadh ábhar Fossify Clock agus roghanna téama dorcha. Cuir an aip in oiriúint le do chuid sainroghanna le dathanna agus téamaí inoiriúnaithe, ag cur le hinúsáidteacht agus ag laghdú brú súl, go háirithe i dtimpeallachtaí íseal-éadrom. + +🔒 PRÍOBHÁIDEACHT - AN CHÉAD CHUR CHUIGE: +Bí cinnte agus fios agat go bhfuil do phríobháideachas cosanta le hoibríocht as líne Fossify Clock. Taithí príobháideacht uasta, slándála, agus cobhsaíocht gan íobairt feidhmiúlacht nó áise. + +🌐 AD-SAOR IN AISCE & FOINSE OSCAILTE: +Slán le fógraí ionsáite agus ceadanna neamhriachtanacha. Tá Fossify Clock saor ó fhógraí, foinse oscailte go hiomlán, agus tugann sé smacht iomlán duit ar do thaithí ama ama. + +Uasghrádaigh do scileanna bainistíochta ama, barrfheabhsú do ghnáthaimh, agus tosaíocht a thabhairt do chodladh níos fearr le Fossify Clock. Íoslódáil anois agus bain smacht ar do chuid ama mar nach raibh riamh cheana. + +Déan tuilleadh aipeanna Fossify a iniúchadh: https://www.fossify.org +Cód Foinse Oscailte: https://www.github.com/FossifyOrg +Bí leis an bpobal ar Reddit: https://www.reddit.com/r/Fossify +Ceangail ar Telegram: https://t.me/Fossify diff --git a/fastlane/metadata/android/ga/short_description.txt b/fastlane/metadata/android/ga/short_description.txt new file mode 100644 index 00000000..2534a1cd --- /dev/null +++ b/fastlane/metadata/android/ga/short_description.txt @@ -0,0 +1 @@ +Aip clog foinse oscailte áisiúil, éadrom le gnéithe riachtanacha. diff --git a/fastlane/metadata/android/ga/title.txt b/fastlane/metadata/android/ga/title.txt new file mode 100644 index 00000000..db0bc001 --- /dev/null +++ b/fastlane/metadata/android/ga/title.txt @@ -0,0 +1 @@ +Clog Fossify From c5ce1831fa25186765524b1905a89167264b6a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aindri=C3=BA=20Mac=20Giolla=20Eoin?= Date: Sat, 30 Nov 2024 11:08:32 +0000 Subject: [PATCH 086/104] Translated using Weblate (Irish) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ga/ --- app/src/main/res/values-ga/strings.xml | 53 +++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ga/strings.xml b/app/src/main/res/values-ga/strings.xml index a6b3daec..901ff80e 100644 --- a/app/src/main/res/values-ga/strings.xml +++ b/app/src/main/res/values-ga/strings.xml @@ -1,2 +1,53 @@ - \ No newline at end of file + + Fad uasta meabhrúcháin + Am caite + Aláram snoozed ag %s + Aláram briste + Roghnaigh uaineadóir le díbhe + Roghnaigh aláram le díbhe + Aláram cruthaithe + Níor aimsíodh aláraim ar bith + Cuir aláram leis + Níor aimsíodh amadóirí ar bith + Cuir uaineadóir leis + + Tá an t-amadóir %d ag rith + Tá %d amadóir ag rith + Tá %d amadóir ag rith + Tá %d amadóir ag rith + Tá %d amadóir ag rith + + Clog + Crios ama + Creathadh + Níl aon lá roghnaithe + Clog + Uaireanta + StopwatchName + Tosaigh stopuaireadóir + Lap + Stop an uaireadóir + Cuireadh stop leis an uaineadóir + Clog agus dáta + Úsáid scáth téacs + Svaidhpeáil ar dheis chun Díbhe, nó ar chlé go Snooze. + Ordú cruthaithe + Am aláraim + Am Lae agus Aláraim + Clog analógach + Clog digiteach + Aláram atá le teacht + Dífhostú aláraim luath + Amadóirí ag rith + Tá an t- amadóir do %s ag rith + Amadóir Nua + Cluaisín clog + Cluaisín aláraim + Cluaisín Stopwatch + Cluaisín uaineadóra + Taispeáin soicindí + Méadaigh an toirt de réir a chéile + Conas is féidir liom sórtáil lap a athrú ag an táb stopwatch? + Just a cliceáil ar aon cheann de na colúin, a dhéanamh ar an laps a shórtáil ag an gcolún a thugtar. Le cad a tharlaíonn nuair breise is féidir leat scoránaigh idir dul suas agus sórtáil íslitheach. + \ No newline at end of file From 925e50c0ca6bf6aad539f3729137613acc3dc81e Mon Sep 17 00:00:00 2001 From: 109247019824 Date: Mon, 2 Dec 2024 18:37:25 +0000 Subject: [PATCH 087/104] Translated using Weblate (Bulgarian) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/bg/ --- app/src/main/res/values-bg/strings.xml | 66 +++++++++++++------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 66038f3b..86cb455b 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -1,50 +1,50 @@ Часовник - Времева зона + Часови пояс Вибрация Не е избран ден Часовник - Таймер + Отброяване Секундомер - Стартирай хронометъра + Старт на секундомера Обиколка Секундомерът е спрян - Таймерът е спрян - Максимално време за напомняне + Отброяването е спряно + Продължителност на напомнянето Времето изтече Час и дата Използване на сянка на текста - Приплъзнете надясно за да отхвърлите или наляво, за да отложите. - Ред на създаване - Време за алармата - Ден и час на алармата + Приплъзнете надясно за изключване, наляво за отлагане. + Реда на създаване + Часа на будилника + Деня и часа на будилника Аналогов часовник Цифров часовник - Алармата е отхвърлена - Избери таймер за отхвърляне - Избери аларма за отхвърляне - Алармата е създадена - Алармата е отложена от %s - Няма намерени аларми - Няма намерени таймери - Предстояща аларма - Ранно изключване на алармата - Таймерите са включени - Таймерът за %s е включен - Нов таймер + Будилникът е изключен + Изберете отброяване, което да изключите + Изберете будилник, което да изключите + Будилникът е създаден + Будилникът е отложен с %s + Липсват будилници + Липсват отброявания + Предстоящ будилник + Ранно изключване на будилник + Отброяванията са включени + Отброяването за %s е включено + Ново отброяване - %d таймер е включен - %d таймери са включени + %d отброяване е включено + %d отброявания са включени Часовник - Аларма - Таб \"Хронометър - Таймер - Покажи секунди - Постепенно увеличавай звука - Как мога да променя сортирането на обиколките на секундомера\? - Просто кликнете на някоя от колонките, това ще ги сортира по тази колонка. С допълнителни кликвания можете да превключвате между възходящо и низходящо сортиране. - Добавяне на таймер - Добавяне на аларма - + Будилник + Секундомер + Отброяване + Показване на секундите + Постепенно усилване на звука + Как да променя сортирането на обиколките на секундомера? + Просто докоснете на някоя от колоните, така ще сортирате по нея. С допълнителни докосвания можете да превключвате между възходящо и низходящо сортиране. + Добавяне на отброяване + Добавяне на будилник + \ No newline at end of file From 0d926ea0393a24a264819a6918ef9f440cef5c22 Mon Sep 17 00:00:00 2001 From: en2sv Date: Sun, 15 Dec 2024 14:12:33 +0000 Subject: [PATCH 088/104] Translated using Weblate (Swedish) Currently translated at 100.0% (44 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/sv/ --- app/src/main/res/values-sv/strings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index b3dd0b91..b4b33c99 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -23,7 +23,7 @@ Alarmet har avvisats Välj timer att avfärda Välj alarm att avfärda - Alarm skapat + Alarmet har skapats Alarmet snoozar %s Inga alarm hittades Lägg till alarm @@ -46,4 +46,5 @@ Höj volymen gradvis Hur kan jag ändra sortering av varv i fliken stoppur\? Klicka bara på någon av kolumnerna för att sortera varven efter den aktuella kolumnen. Med ytterligare klick kan du växla mellan stigande och fallande sortering. - + Timer + \ No newline at end of file From 86aa15e479feccf6a9a9e9a610de73c3bd7d40aa Mon Sep 17 00:00:00 2001 From: eduver Date: Sun, 15 Dec 2024 21:37:49 +0000 Subject: [PATCH 089/104] Translated using Weblate (Interlingua) Currently translated at 59.0% (26 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ia/ --- app/src/main/res/values-ia/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index f30a7229..f4f75da6 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -6,7 +6,7 @@ Horologio digital Scheda de chronometro Horologio e data - Necun dies seligite + Necun die selectionate Alarma create Horologio Necun alarma trovate @@ -23,7 +23,7 @@ Monstrar le secundas Nove temporisator Adder alarma - Initiar le chronometro + Initiar chronometro Horologio analogic Le temporisator esseva stoppate - + \ No newline at end of file From 562ea123db47ffa54ed043fea15ad8206f5dac26 Mon Sep 17 00:00:00 2001 From: eduver Date: Mon, 16 Dec 2024 05:06:58 +0000 Subject: [PATCH 090/104] Translated using Weblate (Interlingua) Currently translated at 59.0% (26 of 44 strings) Translation: Fossify/Clock Translate-URL: https://hosted.weblate.org/projects/fossify/clock/ia/ --- app/src/main/res/values-ia/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index f4f75da6..8971d392 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -20,7 +20,7 @@ Temporisator Scheda de temporisator Adder temporisator - Monstrar le secundas + Monstrar secundas Nove temporisator Adder alarma Initiar chronometro From e8545913077e25adfa3bff6189e22e9e4ff38454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Ke=C3=A7eci?= Date: Thu, 26 Dec 2024 00:52:40 +0300 Subject: [PATCH 091/104] Update Constants.kt MyTimeZone(40, "GMT+02:00 Istanbul", "Europe/Istanbul"), --> MyTimeZone(40, "GMT+03:00 Istanbul", "Europe/Istanbul"), --- app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 99fd99c4..c95ae299 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -170,12 +170,12 @@ fun getAllTimeZones() = arrayListOf( MyTimeZone(37, "GMT+02:00 Windhoek", "Africa/Windhoek"), MyTimeZone(38, "GMT+02:00 Amman", "Asia/Amman"), MyTimeZone(39, "GMT+02:00 Athens", "Europe/Athens"), - MyTimeZone(40, "GMT+02:00 Istanbul", "Europe/Istanbul"), MyTimeZone(41, "GMT+02:00 Beirut", "Asia/Beirut"), MyTimeZone(42, "GMT+02:00 Cairo", "Africa/Cairo"), MyTimeZone(43, "GMT+02:00 Helsinki", "Europe/Helsinki"), MyTimeZone(44, "GMT+02:00 Jerusalem", "Asia/Jerusalem"), MyTimeZone(45, "GMT+02:00 Harare", "Africa/Harare"), + MyTimeZone(40, "GMT+03:00 Istanbul", "Europe/Istanbul"), MyTimeZone(46, "GMT+03:00 Minsk", "Europe/Minsk"), MyTimeZone(47, "GMT+03:00 Baghdad", "Asia/Baghdad"), MyTimeZone(48, "GMT+03:00 Moscow", "Europe/Moscow"), From cb4357dc4fd19c6da501ab649de1e5b9aa22f038 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 17 Jan 2025 17:57:14 +0530 Subject: [PATCH 092/104] Fix typos in issue templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5452c723..793f7dad 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -112,7 +112,7 @@ body: description: | A picture or video is worth a thousand words. - If applicable, drag and drop screenshots or a screen recording to help explain your problem. If your file is too big for Github to accept, try to compress it (ZIP file), or feel free to paste a link to an image/video hoster here instead. + If applicable, drag and drop screenshots or a screen recording to help explain your problem. If your file is too big for Github to accept, try to compress it (ZIP file), or feel free to paste a link to an image/video instead. - type: textarea id: additional-information diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index a0ac2ac9..29add7d3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -20,7 +20,7 @@ body: required: true - label: "I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed." required: true - - label: "**I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.**" + - label: "**I have taken the time to fill in all the required details. I understand that the request will be dismissed otherwise.**" required: true - label: "This issue contains only one feature request." required: true From 4ab462c61fe6255c56ce7c96d6a1db388dfcbb3a Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Tue, 21 Jan 2025 14:00:22 +0530 Subject: [PATCH 093/104] Fix typo in CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91ec40de..c4e81ea3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Before you report something, read the reporting rules [here](https://github.com/FossifyOrg/General-Discussion#how-do-i-suggest-an-improvement-ask-a-question-or-report-an-issue) please. ### Contributing as a developer -Some instructions about code style and everything that has to be done to increase the change of your code getting accepted can be found at the [General Discussion](https://github.com/FossifyOrg/General-Discussion#contribution-rules-for-developers) section. +Some instructions about code style and everything that has to be done to increase the chance of your code getting accepted can be found at the [General Discussion](https://github.com/FossifyOrg/General-Discussion#contribution-rules-for-developers) section. ### Contributing as a non developer In case you just want to for example improve a translation, you can find the way of doing it [here](https://github.com/FossifyOrg/General-Discussion#how-can-i-suggest-an-edit-to-a-file). From f7d983b3e1ba3ec3086171f508a674422f896dfb Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Wed, 22 Jan 2025 00:30:43 +0530 Subject: [PATCH 094/104] Remove optional donation checklist item --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 29add7d3..cf46a3b5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -26,8 +26,6 @@ body: required: true - label: "I have read and understood the [contribution guidelines](https://github.com/FossifyOrg/Clock/blob/master/CONTRIBUTING.md)." required: true - - label: "I optionally [donated](https://fossify.org/donate) to support the Fossify mission." - required: false - type: textarea id: feature-description From 44afeaa23b8368b226cf45545d877f7991c458b3 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:38:03 +0100 Subject: [PATCH 095/104] Fixed choosing custom audio --- .../kotlin/org/fossify/clock/activities/MainActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt index 13041ea6..4379230d 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/MainActivity.kt @@ -179,9 +179,9 @@ class MainActivity : SimpleActivity() { private fun storeNewAlarmSound(resultData: Intent) { val newAlarmSound = storeNewYourAlarmSound(resultData) - when (getTabIndex(binding.viewPager.currentItem)) { - TAB_ALARM -> getViewPagerAdapter()?.updateAlarmTabAlarmSound(newAlarmSound) - TAB_TIMER -> getViewPagerAdapter()?.updateTimerTabAlarmSound(newAlarmSound) + when (binding.viewPager.currentItem) { + TAB_ALARM_INDEX -> getViewPagerAdapter()?.updateAlarmTabAlarmSound(newAlarmSound) + TAB_TIMER_INDEX -> getViewPagerAdapter()?.updateTimerTabAlarmSound(newAlarmSound) } } From 7e891070b66078d439f3e635f77a2476782cbb86 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:50:40 +0100 Subject: [PATCH 096/104] Fixed * imports --- .../fossify/clock/activities/SettingsActivity.kt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 3c4664a5..8d531872 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -5,10 +5,19 @@ import android.os.Bundle import org.fossify.clock.R import org.fossify.clock.databinding.ActivitySettingsBinding import org.fossify.clock.extensions.config -import org.fossify.clock.helpers.* +import org.fossify.clock.helpers.DEFAULT_MAX_ALARM_REMINDER_SECS +import org.fossify.clock.helpers.DEFAULT_MAX_TIMER_REMINDER_SECS +import org.fossify.clock.helpers.TAB_ALARM +import org.fossify.clock.helpers.TAB_CLOCK +import org.fossify.clock.helpers.TAB_STOPWATCH +import org.fossify.clock.helpers.TAB_TIMER import org.fossify.commons.dialogs.RadioGroupDialog import org.fossify.commons.extensions.* -import org.fossify.commons.helpers.* +import org.fossify.commons.helpers.IS_CUSTOMIZING_COLORS +import org.fossify.commons.helpers.MINUTE_SECONDS +import org.fossify.commons.helpers.TAB_LAST_USED +import org.fossify.commons.helpers.NavigationIcon +import org.fossify.commons.helpers.isTiramisuPlus import org.fossify.commons.models.RadioItem import java.util.Locale import kotlin.system.exitProcess From e550f03de258f43d19b59f686c9add291f3a5389 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 31 Jan 2025 11:21:18 +0530 Subject: [PATCH 097/104] Add empty line --- app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index b396370e..a78eba9e 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -58,6 +58,7 @@ const val TAB_CLOCK_INDEX = 0 const val TAB_ALARM_INDEX = 1 const val TAB_STOPWATCH_INDEX = 2 const val TAB_TIMER_INDEX = 3 + const val TIMER_ID = "timer_id" const val INVALID_TIMER_ID = -1 From b6e5820045b59bcd9204c38b86478596c02c2875 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sat, 1 Feb 2025 14:20:59 +0530 Subject: [PATCH 098/104] Use proper style for setting item --- app/src/main/res/layout/activity_settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 83d5931c..7471758c 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -321,7 +321,7 @@ @@ -335,7 +335,7 @@ From f5b0c3197969554c99c7abf3b492173f6cd14e19 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Sun, 2 Feb 2025 20:42:45 +0530 Subject: [PATCH 099/104] Add kotlin serialization --- app/build.gradle.kts | 5 ++++- build.gradle.kts | 1 + gradle/libs.versions.toml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 11afb601..50d1e5c9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,7 @@ import java.io.FileInputStream plugins { alias(libs.plugins.android) alias(libs.plugins.kotlinAndroid) + alias(libs.plugins.kotlinSerialization) alias(libs.plugins.ksp) alias(libs.plugins.detekt) } @@ -75,7 +76,8 @@ android { } compileOptions { - val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get()) + val currentJavaVersionFromLibs = + JavaVersion.valueOf(libs.versions.app.build.javaVersion.get()) sourceCompatibility = currentJavaVersionFromLibs targetCompatibility = currentJavaVersionFromLibs } @@ -114,6 +116,7 @@ dependencies { implementation(libs.numberpicker) implementation(libs.autofittextview) implementation(libs.eventbus) + implementation(libs.kotlinx.serialization.json) implementation(libs.bundles.room) ksp(libs.androidx.room.compiler) diff --git a/build.gradle.kts b/build.gradle.kts index b7bc0032..f09a2174 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.android).apply(false) alias(libs.plugins.kotlinAndroid).apply(false) + alias(libs.plugins.kotlinSerialization).apply(false) alias(libs.plugins.ksp).apply(false) alias(libs.plugins.detekt).apply(false) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2a333cbd..f81d08ae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,7 @@ [versions] #jetbrains kotlin = "1.9.22" +kotlinxSerializationJson = "1.6.0" #KSP ksp = "1.9.22-1.0.17" #Detekt @@ -50,6 +51,8 @@ autofittextview = { module = "me.grantland:autofittextview", version.ref = "auto #EventBus eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" } #KotlinX +#Kotlin +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } #NumberPicker numberpicker = { module = "io.github.ShawnLin013:number-picker", version.ref = "numberpicker" } @@ -74,5 +77,6 @@ lifecycle = [ [plugins] android = { id = "com.android.application", version.ref = "gradlePlugins-agp" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } From 35125775edd861653c91b53ffb0a83fe96c99697 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Mon, 3 Feb 2025 12:02:38 +0530 Subject: [PATCH 100/104] Use kotlin serialization and simplify code - Replaced manual serialization/deserialization with kotlin serialization - Removed unnecessary intent creation - Fixed import/export with SAF on Android 8 & 9 (storage permission was being requested but was never added to the manifest) --- .../clock/activities/SettingsActivity.kt | 216 +++++++----------- .../fossify/clock/dialogs/ExportDataDialog.kt | 55 +++-- .../org/fossify/clock/helpers/Constants.kt | 11 + .../org/fossify/clock/helpers/DataExporter.kt | 51 ----- .../org/fossify/clock/helpers/DataImporter.kt | 121 ---------- .../org/fossify/clock/helpers/ExportHelper.kt | 34 +++ .../org/fossify/clock/helpers/ImportHelper.kt | 109 +++++++++ .../clock/interfaces/JSONConvertible.kt | 5 - .../kotlin/org/fossify/clock/models/Alarm.kt | 52 +---- .../fossify/clock/models/AlarmTimerBackup.kt | 10 + .../kotlin/org/fossify/clock/models/Timer.kt | 53 +---- .../org/fossify/clock/models/TimerState.kt | 5 + 12 files changed, 286 insertions(+), 436 deletions(-) delete mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt delete mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt create mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/ExportHelper.kt create mode 100644 app/src/main/kotlin/org/fossify/clock/helpers/ImportHelper.kt delete mode 100644 app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt create mode 100644 app/src/main/kotlin/org/fossify/clock/models/AlarmTimerBackup.kt diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 8b3ec99a..2fd435ea 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -15,28 +15,27 @@ import org.fossify.clock.extensions.timerDb import org.fossify.clock.helpers.DBHelper import org.fossify.clock.helpers.DEFAULT_MAX_ALARM_REMINDER_SECS import org.fossify.clock.helpers.DEFAULT_MAX_TIMER_REMINDER_SECS -import org.fossify.clock.helpers.DataExporter -import org.fossify.clock.helpers.DataImporter +import org.fossify.clock.helpers.EXPORT_BACKUP_MIME_TYPE +import org.fossify.clock.helpers.ExportHelper +import org.fossify.clock.helpers.IMPORT_BACKUP_MIME_TYPES +import org.fossify.clock.helpers.ImportHelper import org.fossify.clock.helpers.TAB_ALARM import org.fossify.clock.helpers.TAB_CLOCK import org.fossify.clock.helpers.TAB_STOPWATCH import org.fossify.clock.helpers.TAB_TIMER import org.fossify.clock.helpers.TimerHelper -import org.fossify.commons.dialogs.FilePickerDialog +import org.fossify.clock.models.AlarmTimerBackup import org.fossify.commons.dialogs.RadioGroupDialog import org.fossify.commons.extensions.beGoneIf import org.fossify.commons.extensions.beVisibleIf import org.fossify.commons.extensions.formatMinutesToTimeString import org.fossify.commons.extensions.formatSecondsToTimeString import org.fossify.commons.extensions.getCustomizeColorsString -import org.fossify.commons.extensions.getFileOutputStream import org.fossify.commons.extensions.getProperPrimaryColor -import org.fossify.commons.extensions.getTempFile import org.fossify.commons.extensions.isOrWasThankYouInstalled import org.fossify.commons.extensions.launchPurchaseThankYouIntent import org.fossify.commons.extensions.showErrorToast import org.fossify.commons.extensions.showPickSecondsDialog -import org.fossify.commons.extensions.toFileDirItem import org.fossify.commons.extensions.toast import org.fossify.commons.extensions.updateTextColors import org.fossify.commons.extensions.viewBinding @@ -44,20 +43,47 @@ import org.fossify.commons.helpers.ExportResult import org.fossify.commons.helpers.IS_CUSTOMIZING_COLORS import org.fossify.commons.helpers.MINUTE_SECONDS import org.fossify.commons.helpers.NavigationIcon -import org.fossify.commons.helpers.PERMISSION_READ_STORAGE -import org.fossify.commons.helpers.PERMISSION_WRITE_STORAGE import org.fossify.commons.helpers.TAB_LAST_USED import org.fossify.commons.helpers.ensureBackgroundThread -import org.fossify.commons.helpers.isQPlus import org.fossify.commons.helpers.isTiramisuPlus import org.fossify.commons.models.RadioItem -import java.io.FileOutputStream -import java.io.OutputStream +import java.io.IOException import java.util.Locale import kotlin.system.exitProcess class SettingsActivity : SimpleActivity() { private val binding: ActivitySettingsBinding by viewBinding(ActivitySettingsBinding::inflate) + private val exportActivityResultLauncher = + registerForActivityResult(ActivityResultContracts.CreateDocument(EXPORT_BACKUP_MIME_TYPE)) { uri -> + if (uri == null) { + toast(org.fossify.commons.R.string.unknown_error_occurred) + return@registerForActivityResult + } + + ensureBackgroundThread { + try { + exportDataTo(uri) + } catch (e: IOException) { + showErrorToast(e) + } + } + } + + private val importActivityResultLauncher = + registerForActivityResult(ActivityResultContracts.OpenDocument()) { uri -> + if (uri == null) { + toast(org.fossify.commons.R.string.unknown_error_occurred) + return@registerForActivityResult + } + + ensureBackgroundThread { + try { + importData(uri) + } catch (e: Exception) { + showErrorToast(e) + } + } + } override fun onCreate(savedInstanceState: Bundle?) { isMaterialActivity = true @@ -263,144 +289,64 @@ class SettingsActivity : SimpleActivity() { } } - private val exportActivityResultLauncher = - registerForActivityResult(ActivityResultContracts.CreateDocument("application/json")) { uri -> - try { - val outputStream = uri?.let { contentResolver.openOutputStream(it) } - if (outputStream != null) { - exportDataTo(outputStream) - } - } catch (e: Exception) { - showErrorToast(e) - } - } - - private val importActivityResultLauncher = - registerForActivityResult(ActivityResultContracts.GetContent()) { uri -> - try { - if (uri != null) { - tryImportDataFromFile(uri) - } - } catch (e: Exception) { - showErrorToast(e) - } - } - - private fun exportDataTo(outputStream: OutputStream?) { - ensureBackgroundThread { - val alarms = dbHelper.getAlarms() - val timers = timerDb.getTimers() - if (alarms.isEmpty()) { - toast(org.fossify.commons.R.string.no_entries_for_exporting) - } else { - DataExporter.exportData(alarms, timers, outputStream) { - toast( - when (it) { - ExportResult.EXPORT_OK -> org.fossify.commons.R.string.exporting_successful - else -> org.fossify.commons.R.string.exporting_failed - } - ) - } + private fun exportDataTo(outputUri: Uri) { + val alarms = dbHelper.getAlarms() + val timers = timerDb.getTimers() + if (alarms.isEmpty()) { + toast(org.fossify.commons.R.string.no_entries_for_exporting) + } else { + ExportHelper(this).exportData( + backup = AlarmTimerBackup(alarms, timers), + outputUri = outputUri, + ) { + toast( + when (it) { + ExportResult.EXPORT_OK -> org.fossify.commons.R.string.exporting_successful + else -> org.fossify.commons.R.string.exporting_failed + } + ) } } } private fun tryExportData() { - if (isQPlus()) { - ExportDataDialog(this, config.lastDataExportPath, true) { file -> - Intent(Intent.ACTION_CREATE_DOCUMENT).apply { - putExtra(Intent.EXTRA_TITLE, file.name) - addCategory(Intent.CATEGORY_OPENABLE) - - try { - exportActivityResultLauncher.launch(file.name) - } catch (e: ActivityNotFoundException) { - toast( - org.fossify.commons.R.string.system_service_disabled, - Toast.LENGTH_LONG - ) - } catch (e: Exception) { - showErrorToast(e) - } - } - } - } else { - handlePermission(PERMISSION_WRITE_STORAGE) { isAllowed -> - if (isAllowed) { - ExportDataDialog(this, config.lastDataExportPath, false) { file -> - getFileOutputStream(file.toFileDirItem(this), true) { out -> - exportDataTo(out) - } - } - } + ExportDataDialog(this, config.lastDataExportPath) { file -> + try { + exportActivityResultLauncher.launch(file.name) + } catch (e: ActivityNotFoundException) { + toast( + id = org.fossify.commons.R.string.system_service_disabled, + length = Toast.LENGTH_LONG + ) + } catch (e: Exception) { + showErrorToast(e) } } } private fun tryImportData() { - if (isQPlus()) { - Intent(Intent.ACTION_GET_CONTENT).apply { - addCategory(Intent.CATEGORY_OPENABLE) - type = "application/json" - - try { - importActivityResultLauncher.launch(type) - } catch (e: ActivityNotFoundException) { - toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) - } catch (e: Exception) { - showErrorToast(e) - } - } - } else { - handlePermission(PERMISSION_READ_STORAGE) { isAllowed -> - if (isAllowed) { - pickFileToImportData() - } - } + try { + importActivityResultLauncher.launch(IMPORT_BACKUP_MIME_TYPES.toTypedArray()) + } catch (e: ActivityNotFoundException) { + toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG) + } catch (e: Exception) { + showErrorToast(e) } } - private fun pickFileToImportData() { - FilePickerDialog(this) { - importData(it) - } - } + private fun importData(uri: Uri) { + val result = ImportHelper( + context = this, + dbHelper = DBHelper.dbInstance!!, + timerHelper = TimerHelper(this) + ).importData(uri) - private fun tryImportDataFromFile(uri: Uri) { - when (uri.scheme) { - "file" -> importData(uri.path!!) - "content" -> { - val tempFile = getTempFile("fossify_clock_data", "fossify_clock_data.json") - if (tempFile == null) { - toast(org.fossify.commons.R.string.unknown_error_occurred) - return - } - - try { - val inputStream = contentResolver.openInputStream(uri) - val out = FileOutputStream(tempFile) - inputStream!!.copyTo(out) - importData(tempFile.absolutePath) - } catch (e: Exception) { - showErrorToast(e) - } + toast( + when (result) { + ImportHelper.ImportResult.IMPORT_OK -> org.fossify.commons.R.string.importing_successful + ImportHelper.ImportResult.IMPORT_INCOMPLETE -> org.fossify.commons.R.string.no_new_entries_for_importing + ImportHelper.ImportResult.IMPORT_FAIL -> org.fossify.commons.R.string.no_items_found } - - else -> toast(org.fossify.commons.R.string.invalid_file_format) - } - } - - private fun importData(path: String) { - ensureBackgroundThread { - val result = - DataImporter(this, DBHelper.dbInstance!!, TimerHelper(this)).importData(path) - toast( - when (result) { - DataImporter.ImportResult.IMPORT_OK -> org.fossify.commons.R.string.importing_successful - DataImporter.ImportResult.IMPORT_INCOMPLETE -> org.fossify.commons.R.string.no_new_entries_for_importing - DataImporter.ImportResult.IMPORT_FAIL -> org.fossify.commons.R.string.no_items_found - } - ) - } + ) } } diff --git a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt index 6ab79fb9..920fbe5e 100644 --- a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt +++ b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt @@ -1,48 +1,57 @@ package org.fossify.clock.dialogs +import android.annotation.SuppressLint import androidx.appcompat.app.AlertDialog -import org.fossify.commons.activities.BaseSimpleActivity -import org.fossify.commons.dialogs.FilePickerDialog -import org.fossify.commons.extensions.* -import org.fossify.commons.helpers.ensureBackgroundThread import org.fossify.clock.R import org.fossify.clock.databinding.DialogExportDataBinding import org.fossify.clock.extensions.config import org.fossify.clock.helpers.DATA_EXPORT_EXTENSION +import org.fossify.commons.activities.BaseSimpleActivity +import org.fossify.commons.extensions.beGone +import org.fossify.commons.extensions.getAlertDialogBuilder +import org.fossify.commons.extensions.getCurrentFormattedDateTime +import org.fossify.commons.extensions.getParentPath +import org.fossify.commons.extensions.humanizePath +import org.fossify.commons.extensions.internalStoragePath +import org.fossify.commons.extensions.isAValidFilename +import org.fossify.commons.extensions.setupDialogStuff +import org.fossify.commons.extensions.showKeyboard +import org.fossify.commons.extensions.toast +import org.fossify.commons.extensions.value +import org.fossify.commons.helpers.ensureBackgroundThread import java.io.File +@SuppressLint("SetTextI18n") class ExportDataDialog( - val activity: BaseSimpleActivity, - val path: String, - val hidePath: Boolean, - callback: (file: File) -> Unit, + private val activity: BaseSimpleActivity, + private val path: String, + private val callback: (file: File) -> Unit, ) { + + companion object { + private const val EXPORT_FILE_NAME = "alarms_and_timers" + } + private var realPath = path.ifEmpty { activity.internalStoragePath } private val config = activity.config init { val view = DialogExportDataBinding.inflate(activity.layoutInflater, null, false).apply { exportDataFolder.text = activity.humanizePath(realPath) - exportDataFilename.setText("${activity.getString(R.string.settings_export_data)}_${activity.getCurrentFormattedDateTime()}") - - if (hidePath) { - exportDataFolderLabel.beGone() - exportDataFolder.beGone() - } else { - exportDataFolder.setOnClickListener { - FilePickerDialog(activity, realPath, false, showFAB = true) { - exportDataFolder.text = activity.humanizePath(it) - realPath = it - } - } - } + exportDataFilename.setText("${EXPORT_FILE_NAME}_${activity.getCurrentFormattedDateTime()}") + exportDataFolderLabel.beGone() + exportDataFolder.beGone() } activity.getAlertDialogBuilder() .setPositiveButton(org.fossify.commons.R.string.ok, null) .setNegativeButton(org.fossify.commons.R.string.cancel, null) .apply { - activity.setupDialogStuff(view.root, this, R.string.settings_export_data) { alertDialog -> + activity.setupDialogStuff( + view = view.root, + dialog = this, + titleId = R.string.settings_export_data + ) { alertDialog -> alertDialog.showKeyboard(view.exportDataFilename) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { val filename = view.exportDataFilename.value @@ -50,7 +59,7 @@ class ExportDataDialog( filename.isEmpty() -> activity.toast(org.fossify.commons.R.string.empty_name) filename.isAValidFilename() -> { val file = File(realPath, "$filename$DATA_EXPORT_EXTENSION") - if (!hidePath && file.exists()) { + if (file.exists()) { activity.toast(org.fossify.commons.R.string.name_taken) return@setOnClickListener } diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 48816295..6473f2ec 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -91,6 +91,17 @@ val DAY_BIT_MAP = mapOf( Calendar.SATURDAY to SATURDAY_BIT, ) +// Import/export +const val EXPORT_BACKUP_MIME_TYPE = "application/json" +val IMPORT_BACKUP_MIME_TYPES = buildList { + add("application/json") + if (!isPiePlus()) { + // Workaround for https://github.com/FossifyOrg/Messages/issues/88 + add("application/octet-stream") + } +} + + fun getDefaultTimeZoneTitle(id: Int) = getAllTimeZones().firstOrNull { it.id == id }?.title ?: "" fun getPassedSeconds(): Int { diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt deleted file mode 100644 index 43f7c626..00000000 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataExporter.kt +++ /dev/null @@ -1,51 +0,0 @@ -package org.fossify.clock.helpers - -import org.fossify.clock.interfaces.JSONConvertible -import org.fossify.commons.helpers.ExportResult -import org.json.JSONArray -import org.json.JSONObject -import java.io.OutputStream - -object DataExporter { - - fun exportData( - alarms: List, - timers: List, - outputStream: OutputStream?, - callback: (result: ExportResult) -> Unit, - ) { - if (outputStream == null) { - callback.invoke(ExportResult.EXPORT_FAIL) - return - } - - val alarmsJsonArray = toJsonArray(alarms) - val timersJsonArray = toJsonArray(timers) - - val jsonObject = JSONObject().apply { - put("alarms", alarmsJsonArray) - put("timers", timersJsonArray) - } - - try { - outputStream.bufferedWriter().use { out -> - out.write(jsonObject.toString()) - } - callback.invoke(ExportResult.EXPORT_OK) - } catch (e: Exception) { - callback.invoke(ExportResult.EXPORT_FAIL) - } - } - - private fun toJsonArray(list: List): JSONArray { - return if (list.isEmpty()) { - JSONArray() - } else { - JSONArray().apply { - list.forEach { item -> - put(JSONObject(item.toJSON())) - } - } - } - } -} diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt b/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt deleted file mode 100644 index fdb25491..00000000 --- a/app/src/main/kotlin/org/fossify/clock/helpers/DataImporter.kt +++ /dev/null @@ -1,121 +0,0 @@ -package org.fossify.clock.helpers - -import android.app.Activity -import org.fossify.clock.models.Alarm -import org.fossify.clock.models.Timer -import org.fossify.commons.extensions.showErrorToast -import org.json.JSONArray -import org.json.JSONObject -import java.io.File - -class DataImporter( - private val activity: Activity, - private val dbHelper: DBHelper, - private val timerHelper: TimerHelper -) { - - enum class ImportResult { - IMPORT_INCOMPLETE, - IMPORT_FAIL, - IMPORT_OK - } - - fun importData(path: String): ImportResult { - return try { - val inputStream = File(path).inputStream() - val jsonString = inputStream.bufferedReader().use { it.readText().trimEnd() } - val jsonObject = JSONObject(jsonString) - val alarmsFromJson = jsonObject.getJSONArray("alarms") - val timersFromJson = jsonObject.getJSONArray("timers") - - val importedAlarms = insertAlarmsFromJSON(alarmsFromJson) - val importedTimers = insertTimersFromJSON(timersFromJson) - - if (importedAlarms > 0 || importedTimers > 0) { - ImportResult.IMPORT_OK - } else if (importedAlarms == 0 && importedTimers == 0) { - ImportResult.IMPORT_INCOMPLETE - } else { - ImportResult.IMPORT_FAIL - } - } catch (e: Exception) { - activity.showErrorToast(e) - ImportResult.IMPORT_FAIL - } - } - - - private fun insertAlarmsFromJSON(jsonArray: JSONArray): Int { - val existingAlarms = dbHelper.getAlarms() - var insertedCount = 0 - for (i in 0 until jsonArray.length()) { - val jsonObject = jsonArray.getJSONObject(i) - if (Alarm.parseFromJSON(jsonObject) != null) { - val alarm = Alarm.parseFromJSON(jsonObject) as Alarm - if (!isAlarmAlreadyInserted(alarm, existingAlarms)) { - if (dbHelper.insertAlarm(alarm) != -1) { - insertedCount++ - } - } - } - } - return insertedCount - } - - private fun insertTimersFromJSON(jsonArray: JSONArray): Int { - var insertedCount = 0 - for (i in 0 until jsonArray.length()) { - val jsonObject = jsonArray.getJSONObject(i) - if (Timer.parseFromJSON(jsonObject) != null) { - val timer = Timer.parseFromJSON(jsonObject) as Timer - timerHelper.getTimers { existingTimers -> - timer.id = if (existingTimers.isNotEmpty()) { - existingTimers.last().id?.plus(1) - } else { - 1 - } - if (!isTimerAlreadyInserted(timer, existingTimers)) { - timerHelper.insertOrUpdateTimer(timer) { id -> - if (id != -1L) { - insertedCount++ - } - } - } - } - } - } - return insertedCount - } - - private fun isAlarmAlreadyInserted(alarm: Alarm, existingAlarms: List): Boolean { - for (existingAlarm in existingAlarms) { - if (alarm.timeInMinutes == existingAlarm.timeInMinutes && - alarm.days == existingAlarm.days && - alarm.vibrate == existingAlarm.vibrate && - alarm.soundTitle == existingAlarm.soundTitle && - alarm.soundUri == existingAlarm.soundUri && - alarm.label == existingAlarm.label && - alarm.oneShot == existingAlarm.oneShot - ) { - return true - } - } - return false - } - - private fun isTimerAlreadyInserted(timer: Timer, existingTimers: List): Boolean { - for (existingTimer in existingTimers) { - if (timer.seconds == existingTimer.seconds && - timer.vibrate == existingTimer.vibrate && - timer.soundUri == existingTimer.soundUri && - timer.soundTitle == existingTimer.soundTitle && - timer.label == existingTimer.label && - timer.createdAt == existingTimer.createdAt - ) { - return true - } - } - return false - } -} - diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/ExportHelper.kt b/app/src/main/kotlin/org/fossify/clock/helpers/ExportHelper.kt new file mode 100644 index 00000000..5e5513a7 --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/helpers/ExportHelper.kt @@ -0,0 +1,34 @@ +package org.fossify.clock.helpers + +import android.content.Context +import android.net.Uri +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.encodeToStream +import org.fossify.clock.models.AlarmTimerBackup +import org.fossify.commons.helpers.ExportResult + +class ExportHelper(private val context: Context) { + + @OptIn(ExperimentalSerializationApi::class) + fun exportData( + backup: AlarmTimerBackup, + outputUri: Uri?, + callback: (result: ExportResult) -> Unit, + ) { + if (outputUri == null) { + callback.invoke(ExportResult.EXPORT_FAIL) + return + } + + try { + val json = Json { encodeDefaults = true } + context.contentResolver.openOutputStream(outputUri)?.use { out -> + json.encodeToStream(backup, out) + callback.invoke(ExportResult.EXPORT_OK) + } ?: throw NullPointerException("Output stream is null") + } catch (e: Exception) { + callback.invoke(ExportResult.EXPORT_FAIL) + } + } +} diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/ImportHelper.kt b/app/src/main/kotlin/org/fossify/clock/helpers/ImportHelper.kt new file mode 100644 index 00000000..bcb524d7 --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/helpers/ImportHelper.kt @@ -0,0 +1,109 @@ +package org.fossify.clock.helpers + +import android.content.Context +import android.net.Uri +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.decodeFromStream +import org.fossify.clock.models.Alarm +import org.fossify.clock.models.AlarmTimerBackup +import org.fossify.clock.models.Timer +import org.fossify.commons.extensions.showErrorToast + +class ImportHelper( + private val context: Context, + private val dbHelper: DBHelper, + private val timerHelper: TimerHelper, +) { + + enum class ImportResult { + IMPORT_INCOMPLETE, + IMPORT_FAIL, + IMPORT_OK + } + + @OptIn(ExperimentalSerializationApi::class) + fun importData(uri: Uri): ImportResult { + return try { + context.contentResolver.openInputStream(uri)?.use { inputStream -> + val backup = Json.decodeFromStream(inputStream) + val importedAlarms = insertAlarms(backup.alarms) + val importedTimers = insertTimers(backup.timers) + when { + importedAlarms > 0 || importedTimers > 0 -> ImportResult.IMPORT_OK + importedAlarms == 0 && importedTimers == 0 -> ImportResult.IMPORT_INCOMPLETE + else -> ImportResult.IMPORT_FAIL + } + } ?: ImportResult.IMPORT_FAIL + } catch (e: Exception) { + context.showErrorToast(e) + ImportResult.IMPORT_FAIL + } + } + + private fun insertAlarms(alarms: List): Int { + val existingAlarms = dbHelper.getAlarms() + var insertedCount = 0 + alarms.forEach { alarm -> + if (!isAlarmAlreadyInserted(alarm, existingAlarms)) { + if (dbHelper.insertAlarm(alarm) != -1) { + insertedCount++ + } + } + } + return insertedCount + } + + private fun insertTimers(timers: List): Int { + var insertedCount = 0 + timers.forEach { timer -> + timerHelper.getTimers { existingTimers -> + timer.id = if (existingTimers.isNotEmpty()) { + existingTimers.last().id?.plus(1) + } else { + 1 + } + if (!isTimerAlreadyInserted(timer, existingTimers)) { + timerHelper.insertOrUpdateTimer(timer) { id -> + if (id != -1L) { + insertedCount++ + } + } + } + } + } + return insertedCount + } + + private fun isAlarmAlreadyInserted(alarm: Alarm, existingAlarms: List): Boolean { + for (existingAlarm in existingAlarms) { + if (alarm.timeInMinutes == existingAlarm.timeInMinutes && + alarm.days == existingAlarm.days && + alarm.vibrate == existingAlarm.vibrate && + alarm.soundTitle == existingAlarm.soundTitle && + alarm.soundUri == existingAlarm.soundUri && + alarm.label == existingAlarm.label && + alarm.oneShot == existingAlarm.oneShot + ) { + return true + } + } + return false + } + + private fun isTimerAlreadyInserted(timer: Timer, existingTimers: List): Boolean { + for (existingTimer in existingTimers) { + if (timer.seconds == existingTimer.seconds && + timer.vibrate == existingTimer.vibrate && + timer.soundUri == existingTimer.soundUri && + timer.soundTitle == existingTimer.soundTitle && + timer.label == existingTimer.label && + timer.createdAt == existingTimer.createdAt + ) { + return true + } + } + return false + } +} + diff --git a/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt b/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt deleted file mode 100644 index b0977b11..00000000 --- a/app/src/main/kotlin/org/fossify/clock/interfaces/JSONConvertible.kt +++ /dev/null @@ -1,5 +0,0 @@ -package org.fossify.clock.interfaces - -interface JSONConvertible { - fun toJSON(): String -} diff --git a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt index 674986c5..9d068411 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Alarm.kt @@ -1,10 +1,9 @@ package org.fossify.clock.models import androidx.annotation.Keep -import org.fossify.clock.interfaces.JSONConvertible -import org.json.JSONObject @Keep +@kotlinx.serialization.Serializable data class Alarm( var id: Int, var timeInMinutes: Int, @@ -15,54 +14,7 @@ data class Alarm( var soundUri: String, var label: String, var oneShot: Boolean = false, -) : JSONConvertible { - override fun toJSON(): String { - val jsonObject = JSONObject() - jsonObject.put("id", id) - jsonObject.put("timeInMinutes", timeInMinutes) - jsonObject.put("days", days) - jsonObject.put("vibrate", vibrate) - jsonObject.put("soundTitle", soundTitle) - jsonObject.put("soundUri", soundUri) - jsonObject.put("label", label) - return jsonObject.toString() - } - - companion object { - fun parseFromJSON(jsonObject: JSONObject): Alarm? { - - if (!jsonObject.has("id") || - !jsonObject.has("timeInMinutes") || - !jsonObject.has("days") || - !jsonObject.has("vibrate") || - !jsonObject.has("soundTitle") || - !jsonObject.has("soundUri") || - !jsonObject.has("label") - ) { - return null - } - - val id = jsonObject.getInt("id") - val timeInMinutes = jsonObject.getInt("timeInMinutes") - val days = jsonObject.getInt("days") - val vibrate = jsonObject.getBoolean("vibrate") - val soundTitle = jsonObject.getString("soundTitle") - val soundUri = jsonObject.getString("soundUri") - val label = jsonObject.getString("label") - - return Alarm( - id, - timeInMinutes, - days, - false, - vibrate, - soundTitle, - soundUri, - label - ) - } - } -} +) @Keep data class ObfuscatedAlarm( diff --git a/app/src/main/kotlin/org/fossify/clock/models/AlarmTimerBackup.kt b/app/src/main/kotlin/org/fossify/clock/models/AlarmTimerBackup.kt new file mode 100644 index 00000000..c7deac16 --- /dev/null +++ b/app/src/main/kotlin/org/fossify/clock/models/AlarmTimerBackup.kt @@ -0,0 +1,10 @@ +package org.fossify.clock.models + +import androidx.annotation.Keep + +@Keep +@kotlinx.serialization.Serializable +data class AlarmTimerBackup( + val alarms: List, + val timers: List, +) diff --git a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt index 523af0d8..7899a787 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/Timer.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/Timer.kt @@ -3,11 +3,10 @@ package org.fossify.clock.models import androidx.annotation.Keep import androidx.room.Entity import androidx.room.PrimaryKey -import org.fossify.clock.interfaces.JSONConvertible -import org.json.JSONObject @Entity(tableName = "timers") @Keep +@kotlinx.serialization.Serializable data class Timer( @PrimaryKey(autoGenerate = true) var id: Int?, var seconds: Int, @@ -19,55 +18,7 @@ data class Timer( var createdAt: Long, var channelId: String? = null, var oneShot: Boolean = false, -) : JSONConvertible { - override fun toJSON(): String { - val jsonObject = JSONObject() - jsonObject.put("id", id) - jsonObject.put("seconds", seconds) - jsonObject.put("vibrate", vibrate) - jsonObject.put("soundUri", soundUri) - jsonObject.put("soundTitle", soundTitle) - jsonObject.put("label", label) - jsonObject.put("createdAt", createdAt) - jsonObject.put("oneShot", oneShot) - return jsonObject.toString() - } - - companion object { - fun parseFromJSON(jsonObject: JSONObject): Timer? { - - if (!jsonObject.has("id") || - !jsonObject.has("seconds") || - !jsonObject.has("vibrate") || - !jsonObject.has("soundUri") || - !jsonObject.has("soundTitle") || - !jsonObject.has("label") || - !jsonObject.has("createdAt") - ) { - return null - } - - val id = jsonObject.getInt("id") - val second = jsonObject.getInt("seconds") - val vibrate = jsonObject.getBoolean("vibrate") - val soundUri = jsonObject.getString("soundUri") - val soundTitle = jsonObject.getString("soundTitle") - val label = jsonObject.getString("label") - val createdAt = jsonObject.getLong("createdAt") - - return Timer( - id, - second, - TimerState.Idle, - vibrate, - soundUri, - soundTitle, - label, - createdAt - ) - } - } -} +) @Keep data class ObfuscatedTimer( diff --git a/app/src/main/kotlin/org/fossify/clock/models/TimerState.kt b/app/src/main/kotlin/org/fossify/clock/models/TimerState.kt index 1737e9d4..26b70337 100644 --- a/app/src/main/kotlin/org/fossify/clock/models/TimerState.kt +++ b/app/src/main/kotlin/org/fossify/clock/models/TimerState.kt @@ -3,16 +3,21 @@ package org.fossify.clock.models import androidx.annotation.Keep @Keep +@kotlinx.serialization.Serializable sealed class TimerState { @Keep + @kotlinx.serialization.Serializable object Idle : TimerState() @Keep + @kotlinx.serialization.Serializable data class Running(val duration: Long, val tick: Long) : TimerState() @Keep + @kotlinx.serialization.Serializable data class Paused(val duration: Long, val tick: Long) : TimerState() @Keep + @kotlinx.serialization.Serializable object Finished : TimerState() } From c4f429ad90f244a591d0f0e552e5ba2b979cae59 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Mon, 3 Feb 2025 16:25:28 +0530 Subject: [PATCH 101/104] Fix lint errors --- .../org/fossify/clock/activities/SettingsActivity.kt | 12 +++++++++--- .../org/fossify/clock/dialogs/ExportDataDialog.kt | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 2fd435ea..ed4eb03b 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -26,7 +26,9 @@ import org.fossify.clock.helpers.TAB_TIMER import org.fossify.clock.helpers.TimerHelper import org.fossify.clock.models.AlarmTimerBackup import org.fossify.commons.dialogs.RadioGroupDialog +import org.fossify.commons.extensions.beGone import org.fossify.commons.extensions.beGoneIf +import org.fossify.commons.extensions.beVisible import org.fossify.commons.extensions.beVisibleIf import org.fossify.commons.extensions.formatMinutesToTimeString import org.fossify.commons.extensions.formatSecondsToTimeString @@ -156,9 +158,13 @@ class SettingsActivity : SimpleActivity() { private fun setupLanguage() { binding.settingsLanguage.text = Locale.getDefault().displayLanguage - binding.settingsLanguageHolder.beVisibleIf(isTiramisuPlus()) - binding.settingsLanguageHolder.setOnClickListener { - launchChangeAppLanguageIntent() + if (isTiramisuPlus()) { + binding.settingsLanguageHolder.beVisible() + binding.settingsLanguageHolder.setOnClickListener { + launchChangeAppLanguageIntent() + } + } else { + binding.settingsLanguageHolder.beGone() } } diff --git a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt index 920fbe5e..144facb9 100644 --- a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt +++ b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt @@ -24,7 +24,7 @@ import java.io.File @SuppressLint("SetTextI18n") class ExportDataDialog( private val activity: BaseSimpleActivity, - private val path: String, + path: String, private val callback: (file: File) -> Unit, ) { @@ -32,7 +32,7 @@ class ExportDataDialog( private const val EXPORT_FILE_NAME = "alarms_and_timers" } - private var realPath = path.ifEmpty { activity.internalStoragePath } + private val realPath = path.ifEmpty { activity.internalStoragePath } private val config = activity.config init { From 5a5009245c0f428721eb518f463373fbeea4d1b3 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Mon, 3 Feb 2025 16:44:24 +0530 Subject: [PATCH 102/104] Remove unnecessary toast User pressing back is not an error. --- .../org/fossify/clock/activities/SettingsActivity.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index ed4eb03b..9f2365f5 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -57,11 +57,7 @@ class SettingsActivity : SimpleActivity() { private val binding: ActivitySettingsBinding by viewBinding(ActivitySettingsBinding::inflate) private val exportActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument(EXPORT_BACKUP_MIME_TYPE)) { uri -> - if (uri == null) { - toast(org.fossify.commons.R.string.unknown_error_occurred) - return@registerForActivityResult - } - + if (uri == null) return@registerForActivityResult ensureBackgroundThread { try { exportDataTo(uri) @@ -73,11 +69,7 @@ class SettingsActivity : SimpleActivity() { private val importActivityResultLauncher = registerForActivityResult(ActivityResultContracts.OpenDocument()) { uri -> - if (uri == null) { - toast(org.fossify.commons.R.string.unknown_error_occurred) - return@registerForActivityResult - } - + if (uri == null) return@registerForActivityResult ensureBackgroundThread { try { importData(uri) From 6feb093ca66a0797384869e345e423dd082a4c23 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Tue, 4 Feb 2025 14:54:01 +0530 Subject: [PATCH 103/104] Allow exporting timers alarms or timers Timers alone couldn't be exported before. --- .../kotlin/org/fossify/clock/activities/SettingsActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt index 9f2365f5..d81eb8ec 100644 --- a/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/clock/activities/SettingsActivity.kt @@ -290,7 +290,7 @@ class SettingsActivity : SimpleActivity() { private fun exportDataTo(outputUri: Uri) { val alarms = dbHelper.getAlarms() val timers = timerDb.getTimers() - if (alarms.isEmpty()) { + if (alarms.isEmpty() && timers.isEmpty()) { toast(org.fossify.commons.R.string.no_entries_for_exporting) } else { ExportHelper(this).exportData( From 4fef367a1f95a684a438a6ec92a9c9602a275b0c Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Tue, 4 Feb 2025 15:01:02 +0530 Subject: [PATCH 104/104] Remove unnecessary widgets from export dialog --- .../fossify/clock/dialogs/ExportDataDialog.kt | 5 -- .../main/res/layout/dialog_export_data.xml | 60 ++++++------------- 2 files changed, 18 insertions(+), 47 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt index 144facb9..a61d401e 100644 --- a/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt +++ b/app/src/main/kotlin/org/fossify/clock/dialogs/ExportDataDialog.kt @@ -7,11 +7,9 @@ import org.fossify.clock.databinding.DialogExportDataBinding import org.fossify.clock.extensions.config import org.fossify.clock.helpers.DATA_EXPORT_EXTENSION import org.fossify.commons.activities.BaseSimpleActivity -import org.fossify.commons.extensions.beGone import org.fossify.commons.extensions.getAlertDialogBuilder import org.fossify.commons.extensions.getCurrentFormattedDateTime import org.fossify.commons.extensions.getParentPath -import org.fossify.commons.extensions.humanizePath import org.fossify.commons.extensions.internalStoragePath import org.fossify.commons.extensions.isAValidFilename import org.fossify.commons.extensions.setupDialogStuff @@ -37,10 +35,7 @@ class ExportDataDialog( init { val view = DialogExportDataBinding.inflate(activity.layoutInflater, null, false).apply { - exportDataFolder.text = activity.humanizePath(realPath) exportDataFilename.setText("${EXPORT_FILE_NAME}_${activity.getCurrentFormattedDateTime()}") - exportDataFolderLabel.beGone() - exportDataFolder.beGone() } activity.getAlertDialogBuilder() diff --git a/app/src/main/res/layout/dialog_export_data.xml b/app/src/main/res/layout/dialog_export_data.xml index f85c98c0..392ef38d 100644 --- a/app/src/main/res/layout/dialog_export_data.xml +++ b/app/src/main/res/layout/dialog_export_data.xml @@ -1,51 +1,27 @@ - + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingLeft="@dimen/activity_margin" + android:paddingTop="@dimen/activity_margin" + android:paddingRight="@dimen/activity_margin"> - + android:hint="@string/filename_without_json"> - - - + android:layout_marginBottom="@dimen/activity_margin" + android:singleLine="true" + android:textCursorDrawable="@null" + android:textSize="@dimen/normal_text_size" /> - - - - - - - + + \ No newline at end of file