mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Convert top level "Utils" class to kotlin (#6364)
* Unused class removed * Convert BasePresenter to kotlin * Removed redundent class * Move the Utils class into the utils package * Inline the creation of a page title object * Move license utilities into their own file * Inline app rating since its only ever used in 1 place * Moved GeoCoordinates utilities into their own class * Moved Monuments related utils into their own class * Moved screen capture into its own util class * Moved handleWebUrl to its own utility class * Moved fixExtension to its own class * Moved clipboard copy into its own utility class * Renames class to match remaining utility method * Convert UnderlineUtils to kotlin * Converted the copy-to-clipboard utility to kotlin * Converted license name and url lookup to kotlin * Converted fixExtension to kotlin * Convert handleGeoCoordinates to kotlin * Monument utils converted to kotlin * Convert then inline screeen capture in kotlin * Convert handleWebUrl to kotlin
This commit is contained in:
parent
4befff8f42
commit
3bd0ec4466
44 changed files with 387 additions and 519 deletions
|
|
@ -25,7 +25,6 @@ import androidx.core.content.ContextCompat
|
|||
import fr.free.nrw.commons.BuildConfig
|
||||
import fr.free.nrw.commons.CommonsApplication
|
||||
import fr.free.nrw.commons.R
|
||||
import fr.free.nrw.commons.Utils
|
||||
import fr.free.nrw.commons.auth.login.LoginCallback
|
||||
import fr.free.nrw.commons.auth.login.LoginClient
|
||||
import fr.free.nrw.commons.auth.login.LoginResult
|
||||
|
|
@ -38,6 +37,7 @@ import fr.free.nrw.commons.utils.ActivityUtils.startActivityWithFlags
|
|||
import fr.free.nrw.commons.utils.ConfigUtils.isBetaFlavour
|
||||
import fr.free.nrw.commons.utils.SystemThemeUtils
|
||||
import fr.free.nrw.commons.utils.ViewUtil.hideKeyboard
|
||||
import fr.free.nrw.commons.utils.handleWebUrl
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import timber.log.Timber
|
||||
import java.util.Locale
|
||||
|
|
@ -254,10 +254,10 @@ class LoginActivity : AccountAuthenticatorActivity() {
|
|||
}
|
||||
|
||||
private fun forgotPassword() =
|
||||
Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL))
|
||||
handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL))
|
||||
|
||||
private fun onPrivacyPolicyClicked() =
|
||||
Utils.handleWebUrl(this, Uri.parse(BuildConfig.PRIVACY_POLICY_URL))
|
||||
handleWebUrl(this, Uri.parse(BuildConfig.PRIVACY_POLICY_URL))
|
||||
|
||||
private fun signUp() =
|
||||
startActivity(Intent(this, SignupActivity::class.java))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue