Skip to content

Commit 259f5a3

Browse files
committed
Refactoring - 10
1 parent 16a1c3a commit 259f5a3

File tree

3 files changed

+5
-22
lines changed
  • common/src/main/kotlin/io/github/jisungbin/gitmessengerbot/common/extension
  • core/src/main/kotlin/io/github/sungbin/gitmessengerbot/core/bot/api

3 files changed

+5
-22
lines changed

common/src/main/kotlin/io/github/jisungbin/gitmessengerbot/common/extension/Activity.kt

-17
This file was deleted.

common/src/main/kotlin/io/github/jisungbin/gitmessengerbot/common/extension/UI.kt renamed to common/src/main/kotlin/io/github/jisungbin/gitmessengerbot/common/extension/toast.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* GitMessengerBot © 2021 지성빈 & 구환. all rights reserved.
33
* GitMessengerBot license is under the GPL-3.0.
44
*
5-
* [UI.kt] created by Ji Sungbin on 21. 8. 30. 오후 5:06
5+
* [toast.kt] created by Ji Sungbin on 21. 8. 30. 오후 5:06
66
*
77
* Please see: https://github.com/GitMessengerBot/GitMessengerBot-Android/blob/master/LICENSE.
88
*/
@@ -13,9 +13,9 @@ import android.app.Activity
1313
import android.content.Context
1414
import android.widget.Toast
1515

16-
fun toast(activity: Activity, message: String, length: Int = Toast.LENGTH_SHORT) {
17-
activity.runOnUiThread {
18-
toast(activity, message, length)
16+
fun Activity.toast(message: String, length: Int = Toast.LENGTH_SHORT) {
17+
runOnUiThread {
18+
toast(this, message, length)
1919
}
2020
}
2121

core/src/main/kotlin/io/github/sungbin/gitmessengerbot/core/bot/api/UI.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* GitMessengerBot © 2021 지성빈 & 구환. all rights reserved.
33
* GitMessengerBot license is under the GPL-3.0.
44
*
5-
* [UI.kt] created by Ji Sungbin on 21. 7. 10. 오전 11:35.
5+
* [toast.kt] created by Ji Sungbin on 21. 7. 10. 오전 11:35.
66
*
77
* Please see: https://github.com/GitMessengerBot/GitMessengerBot-Android/blob/master/LICENSE.
88
*/

0 commit comments

Comments
 (0)