@@ -76,7 +76,7 @@ class MainActivity : AppCompatActivity() {
7676 val contentResolver = applicationContext.contentResolver
7777
7878 val takeFlags: Int = Intent .FLAG_GRANT_READ_URI_PERMISSION or
79- Intent .FLAG_GRANT_WRITE_URI_PERMISSION
79+ Intent .FLAG_GRANT_WRITE_URI_PERMISSION
8080 if (uri != null ) {
8181 contentResolver.takePersistableUriPermission(uri, takeFlags)
8282 }
@@ -122,13 +122,14 @@ class MainActivity : AppCompatActivity() {
122122 */
123123 fun reloadStickers (ignoredView : View ) {
124124 val stickerDirPath = this .sharedPreferences.getString(
125- " stickerDirPath" , null
125+ " stickerDirPath" ,
126+ null ,
126127 )
127128 if (stickerDirPath != null ) {
128129 importStickers(stickerDirPath)
129130 } else {
130131 this .toaster.toast(
131- getString(R .string.imported_034)
132+ getString(R .string.imported_034),
132133 )
133134 }
134135 }
@@ -153,7 +154,7 @@ class MainActivity : AppCompatActivity() {
153154 getString(R .string.imported_031, totalStickers),
154155 getString(R .string.imported_032, totalStickers),
155156 getString(R .string.imported_033, totalStickers),
156- )
157+ ),
157158 )
158159 val editor = sharedPreferences.edit()
159160 editor.putInt(" numStickersImported" , totalStickers)
@@ -178,7 +179,7 @@ class MainActivity : AppCompatActivity() {
178179 compoundButton : CompoundButton ,
179180 sharedPrefKey : String ,
180181 sharedPrefDefault : Boolean = false,
181- callback : (Boolean ) -> Unit
182+ callback : (Boolean ) -> Unit ,
182183 ) {
183184 compoundButton.isChecked =
184185 this .sharedPreferences.getBoolean(sharedPrefKey, sharedPrefDefault)
@@ -207,7 +208,7 @@ class MainActivity : AppCompatActivity() {
207208 seekBarLabel : TextView ,
208209 sharedPrefKey : String ,
209210 sharedPrefDefault : Int ,
210- multiplier : Int = 1
211+ multiplier : Int = 1,
211212 ) {
212213 seekBarLabel.text =
213214 this .sharedPreferences.getInt(sharedPrefKey, sharedPrefDefault).toString()
@@ -228,18 +229,19 @@ class MainActivity : AppCompatActivity() {
228229 editor.apply ()
229230 showChangedPrefText()
230231 }
231- })
232+ },
233+ )
232234 }
233235
234236 /* * Reads saved sticker dir path from preferences */
235237 private fun refreshStickerDirPath () {
236238 findViewById<TextView >(R .id.stickerPackInfoPath).text =
237239 this .sharedPreferences.getString(
238- " stickerDirPath" , resources.getString(R .string.update_sticker_pack_info_path)
240+ " stickerDirPath" , resources.getString(R .string.update_sticker_pack_info_path),
239241 )
240242 findViewById<TextView >(R .id.stickerPackInfoDate).text =
241243 this .sharedPreferences.getString(
242- " lastUpdateDate" , resources.getString(R .string.update_sticker_pack_info_date)
244+ " lastUpdateDate" , resources.getString(R .string.update_sticker_pack_info_date),
243245 )
244246 findViewById<TextView >(R .id.stickerPackInfoTotal).text =
245247 this .sharedPreferences.getInt(" numStickersImported" , 0 ).toString()
@@ -248,7 +250,7 @@ class MainActivity : AppCompatActivity() {
248250 /* * Reusable function to warn about changing preferences */
249251 private fun showChangedPrefText () {
250252 this .toaster.toast(
251- getString(R .string.pref_000)
253+ getString(R .string.pref_000),
252254 )
253255 }
254256}
0 commit comments