mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Switch to AboutLibraries
This commit is contained in:
		| @@ -5,10 +5,9 @@ import android.content.Intent | ||||
| import android.net.Uri | ||||
| import android.os.Build | ||||
| import android.os.Bundle | ||||
| import android.webkit.WebView | ||||
| import androidx.preference.PreferenceScreen | ||||
| import com.afollestad.materialdialogs.MaterialDialog | ||||
| import com.afollestad.materialdialogs.customview.customView | ||||
| import com.mikepenz.aboutlibraries.LibsBuilder | ||||
| import eu.kanade.tachiyomi.BuildConfig | ||||
| import eu.kanade.tachiyomi.R | ||||
| import eu.kanade.tachiyomi.data.updater.UpdateChecker | ||||
| @@ -130,7 +129,12 @@ class AboutController : SettingsController() { | ||||
|                 titleRes = R.string.licenses | ||||
|  | ||||
|                 onClick { | ||||
|                     LicensesDialogController().showDialog(router) | ||||
|                     LibsBuilder() | ||||
|                         .withActivityTitle(activity!!.getString(R.string.licenses)) | ||||
|                         .withAboutIconShown(false) | ||||
|                         .withAboutVersionShown(false) | ||||
|                         .withLicenseShown(true) | ||||
|                         .start(activity!!) | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| @@ -165,19 +169,6 @@ class AboutController : SettingsController() { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     class LicensesDialogController(bundle: Bundle? = null) : DialogController(bundle) { | ||||
|  | ||||
|         override fun onCreateDialog(savedViewState: Bundle?): Dialog { | ||||
|             val webView = WebView(activity!!) | ||||
|             webView.loadUrl("file:///android_asset/open_source_licenses.html") | ||||
|  | ||||
|             return MaterialDialog(activity!!) | ||||
|                 .title(res = R.string.licenses) | ||||
|                 .customView(view = webView) | ||||
|                 .positiveButton(res = android.R.string.ok) | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundle) { | ||||
|  | ||||
|         constructor(body: String, url: String) : this( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user