mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 03:05:11 +00:00
very small UI improvement (show log save location)
This commit is contained in:
parent
1ea32c75ff
commit
b9820468c6
2 changed files with 4 additions and 3 deletions
|
@ -38,14 +38,15 @@ class LogFragment : BindingFragment<FragmentLogBinding>() {
|
|||
val hour = calendar.get(Calendar.HOUR_OF_DAY)
|
||||
val minute = calendar.get(Calendar.MINUTE)
|
||||
val second = calendar.get(Calendar.SECOND)
|
||||
val savePath = requireActivity().getExternalFilesDir("logs")?.path + "/$year$month${day}_$hour$minute$second.log"
|
||||
val log =
|
||||
File(requireActivity().getExternalFilesDir("logs")?.path + "/$year$month${day}_$hour$minute$second.log")
|
||||
File(savePath)
|
||||
FileWriter(log).apply {
|
||||
append(logs)
|
||||
flush()
|
||||
close()
|
||||
}
|
||||
Toast.makeText(requireActivity(), R.string.logs_saved, Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(requireActivity(), getString(R.string.logs_saved, savePath), Toast.LENGTH_SHORT).show()
|
||||
} catch (e: IOException) {
|
||||
Toast.makeText(requireActivity(), R.string.logs_not_saved, Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
<!-- Logs -->
|
||||
<string name="logs_not_saved">Could not save logs</string>
|
||||
<string name="logs_saved">Successfully saved logs</string>
|
||||
<string name="logs_saved">Successfully saved logs to %1$s</string>
|
||||
|
||||
<!-- Dialogs -->
|
||||
<string name="advanced">Details</string>
|
||||
|
|
Loading…
Reference in a new issue