Commit 484c7f0e authored by wanglei's avatar wanglei

..

parent 10b19d7c
......@@ -152,7 +152,9 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
private fun showDay() {
val installTime = SpUtils.getInstance().getLong(KEY_INSTALL_TIME)
val result = calculateDaysBetween(installTime, System.currentTimeMillis())
binding.tvDay.text = "${result.toInt()} ${getString(R.string.days)}"
val day = result.toInt()
val dayString = if (day > 1) getString(R.string.days) else getString(R.string.day)
binding.tvDay.text = "$day $dayString"
}
fun calculateDaysBetween(timestamp1: Long, timestamp2: Long): Long {
......
......@@ -174,7 +174,7 @@
<string name="exit_app_manager_content">Exit App manager? Unused applications may occupy phone memory.</string>
<string name="exit_whatsapp_clean">Exit WhatsApp Clean</string>
<string name="exit_whatsapp_clean_content">Exit WhatsApp Clean? Possible WhatsApp junk files may be using space.</string>
<string name="exit_app_process_content1">Exit App Process?</string>
<string name="exit_app_process_content1">Exit App Process?</string>
<string name="exit_app_process_content2">background processes are still running.</string>
<string name="exit_screenshot_cleaner">Exit Screenshot Clean</string>
<string name="exit_screenshot_cleaner_content">Exit Screenshot Clean? Unremoved screenshots may be taking up space.</string>
......@@ -188,8 +188,8 @@
<string name="notification_not_clean">Not cleaned in</string>
<string name="notification_not_clean_days">day(s)</string>
<string name="result_clean_junk">Clean up unnecessary junk files!</string>
<string name="result_app_processes">Manage backend processes</string>
<string name="result_screenshot_clean">Check Screenshot Clean to release more space</string>
<string name="result_app_processes">Manage backend processes</string>
<string name="result_screenshot_clean">Check Screenshot Clean to release more space</string>
<string name="result_similar_photos">Clean up similar photos to free up space</string>
<string name="result_app_manager">Clear out apps you no longer need</string>
<string name="result_whatsapp_clean">Free up space by cleaning up WhatsApp junkfiles</string>
......@@ -230,7 +230,7 @@
<string name="wait_a_moment">Wait a moment</string>
<string name="best_quality_photo">Best quality photo</string>
<string name="most_space_saved">Most space saved</string>
<string name="confirm_content">The original photos will be replaced by the compressed ones</string>
<string name="confirm_content">The original photos will be replaced by the compressed ones</string>
<string name="process_ad">This process may contain ads</string>
<string name="app">App</string>
<string name="larger_than">Larger than</string>
......@@ -244,6 +244,7 @@
<string name="occupies">Occupies</string>
<string name="have_been_with_you_for">Have been with you for</string>
<string name="days">days</string>
<string name="day">day</string>
<string name="the_best_we_can_get">The best we can get</string>
<string name="whatsapp">WhatsApp</string>
<string name="view">View</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment