Skip to content

Commit

Permalink
change user agent for webview in MAL login activity
Browse files Browse the repository at this point in the history
  • Loading branch information
az4521 committed Dec 5, 2024
1 parent 839056a commit 5e4e06e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.webkit.WebView
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.track.TrackManager
import eu.kanade.tachiyomi.data.track.myanimelist.MyAnimeListApi
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.webview.BaseWebViewActivity
import eu.kanade.tachiyomi.util.system.WebViewClientCompat
Expand All @@ -16,6 +17,7 @@ import uy.kohesive.injekt.injectLazy

class MyAnimeListLoginActivity : BaseWebViewActivity() {
private val trackManager: TrackManager by injectLazy()
private val networkHelper: NetworkHelper by injectLazy()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down Expand Up @@ -57,7 +59,7 @@ class MyAnimeListLoginActivity : BaseWebViewActivity() {
}
}
}

binding.webview.settings.userAgentString = networkHelper.defaultUserAgent
binding.webview.loadUrl(MyAnimeListApi.loginUrl())
}
}
Expand Down

0 comments on commit 5e4e06e

Please sign in to comment.