Skip to content

Commit dcaee88

Browse files
committed
Fix openUrl
1 parent a975739 commit dcaee88

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package me.kyuubiran.akinatorhelper.util
22

3+
import android.content.Context
34
import android.content.Intent
45
import android.net.Uri
5-
import com.github.kyuubiran.ezxhelper.init.InitFields.appContext
66

7-
fun openUrl(url: String) {
8-
appContext.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
7+
fun Context.openUrl(url: String) {
8+
this.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
99
}

app/src/main/java/me/kyuubiran/akinatorhelper/view/SettingDialog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class SettingDialog(activity: Activity) : AlertDialog.Builder(activity) {
152152
)
153153
}
154154
"goto_github" -> {
155-
openUrl("https://github.com/KyuubiRan/AkinatorHelper")
155+
this.activity.openUrl("https://github.com/KyuubiRan/AkinatorHelper")
156156
}
157157
}
158158
return true

0 commit comments

Comments
 (0)