Convert LicenseFragmentHelper methods to top-level declarations.
This commit is contained in:
parent
35a118a2a7
commit
013522c376
2 changed files with 75 additions and 77 deletions
|
@ -8,7 +8,6 @@ import androidx.core.os.bundleOf
|
|||
import androidx.fragment.app.Fragment
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import org.schabi.newpipe.R
|
||||
import org.schabi.newpipe.about.LicenseFragmentHelper.showLicense
|
||||
import org.schabi.newpipe.databinding.FragmentLicensesBinding
|
||||
import org.schabi.newpipe.databinding.ItemSoftwareComponentBinding
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.schabi.newpipe.util.ThemeHelper
|
|||
import org.schabi.newpipe.util.external_communication.ShareUtils
|
||||
import java.io.IOException
|
||||
|
||||
object LicenseFragmentHelper {
|
||||
/**
|
||||
* @param context the context to use
|
||||
* @param license the license
|
||||
|
@ -96,7 +95,8 @@ object LicenseFragmentHelper {
|
|||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe { formattedLicense ->
|
||||
val webViewData = Base64.encodeToString(formattedLicense.toByteArray(), Base64.NO_PADDING)
|
||||
val webViewData =
|
||||
Base64.encodeToString(formattedLicense.toByteArray(), Base64.NO_PADDING)
|
||||
val webView = WebView(context)
|
||||
webView.loadData(webViewData, "text/html; charset=UTF-8", "base64")
|
||||
|
||||
|
@ -110,4 +110,3 @@ object LicenseFragmentHelper {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue