mirror of
https://github.com/etesync/android
synced 2024-11-22 16:08:13 +00:00
Kotlin: more kotlin migration.
This commit is contained in:
parent
f0a0717541
commit
e38c720d1a
@ -46,7 +46,7 @@ import java.util.logging.Level
|
|||||||
|
|
||||||
class AccountActivity : BaseActivity(), Toolbar.OnMenuItemClickListener, PopupMenu.OnMenuItemClickListener, LoaderManager.LoaderCallbacks<AccountActivity.AccountInfo>, Refreshable {
|
class AccountActivity : BaseActivity(), Toolbar.OnMenuItemClickListener, PopupMenu.OnMenuItemClickListener, LoaderManager.LoaderCallbacks<AccountActivity.AccountInfo>, Refreshable {
|
||||||
|
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var accountInfo: AccountInfo? = null
|
private var accountInfo: AccountInfo? = null
|
||||||
|
|
||||||
internal var listCalDAV: ListView? = null
|
internal var listCalDAV: ListView? = null
|
||||||
|
@ -31,7 +31,7 @@ import com.etesync.syncadapter.ui.setup.LoginCredentials
|
|||||||
import com.etesync.syncadapter.ui.setup.LoginCredentialsChangeFragment
|
import com.etesync.syncadapter.ui.setup.LoginCredentialsChangeFragment
|
||||||
|
|
||||||
class AccountSettingsActivity : BaseActivity() {
|
class AccountSettingsActivity : BaseActivity() {
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -19,13 +19,13 @@ import com.etesync.syncadapter.model.CollectionInfo
|
|||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
class AddMemberFragment : DialogFragment() {
|
class AddMemberFragment : DialogFragment() {
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var settings: AccountSettings? = null
|
private var settings: AccountSettings? = null
|
||||||
private var ctx: Context? = null
|
private var ctx: Context? = null
|
||||||
private var remote: HttpUrl? = null
|
private var remote: HttpUrl? = null
|
||||||
private var info: CollectionInfo? = null
|
private lateinit var info: CollectionInfo
|
||||||
private var memberEmail: String? = null
|
private lateinit var memberEmail: String
|
||||||
private var memberPubKey: ByteArray? = null
|
private lateinit var memberPubKey: ByteArray
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
@ -62,7 +62,7 @@ class AddMemberFragment : DialogFragment() {
|
|||||||
|
|
||||||
val userInfo = userInfoManager[memberEmail!!]
|
val userInfo = userInfoManager[memberEmail!!]
|
||||||
?: throw Exception(getString(R.string.collection_members_error_user_not_found, memberEmail))
|
?: throw Exception(getString(R.string.collection_members_error_user_not_found, memberEmail))
|
||||||
memberPubKey = userInfo.pubkey
|
memberPubKey = userInfo.pubkey!!
|
||||||
return AddResult(null)
|
return AddResult(null)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
return AddResult(e)
|
return AddResult(e)
|
||||||
|
@ -39,8 +39,8 @@ import java.io.IOException
|
|||||||
|
|
||||||
class ImportFragment : DialogFragment() {
|
class ImportFragment : DialogFragment() {
|
||||||
|
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var info: CollectionInfo? = null
|
private lateinit var info: CollectionInfo
|
||||||
private var importFile: File? = null
|
private var importFile: File? = null
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
@ -24,8 +24,8 @@ import com.etesync.syncadapter.resource.LocalEvent
|
|||||||
|
|
||||||
class LocalCalendarImportFragment : ListFragment() {
|
class LocalCalendarImportFragment : ListFragment() {
|
||||||
|
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var info: CollectionInfo? = null
|
private lateinit var info: CollectionInfo
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -31,8 +31,8 @@ import java.util.*
|
|||||||
|
|
||||||
class LocalContactImportFragment : Fragment() {
|
class LocalContactImportFragment : Fragment() {
|
||||||
|
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var info: CollectionInfo? = null
|
private lateinit var info: CollectionInfo
|
||||||
private var recyclerView: RecyclerView? = null
|
private var recyclerView: RecyclerView? = null
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
@ -28,7 +28,7 @@ import com.etesync.syncadapter.ui.setup.BaseConfigurationFinder.Configuration
|
|||||||
import java.util.logging.Level
|
import java.util.logging.Level
|
||||||
|
|
||||||
class LoginCredentialsChangeFragment : DialogFragment(), LoaderManager.LoaderCallbacks<Configuration> {
|
class LoginCredentialsChangeFragment : DialogFragment(), LoaderManager.LoaderCallbacks<Configuration> {
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val progress = ProgressDialog(activity)
|
val progress = ProgressDialog(activity)
|
||||||
|
@ -16,8 +16,8 @@ import com.etesync.syncadapter.journalmanager.UserInfoManager
|
|||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
||||||
class SetupUserInfoFragment : DialogFragment() {
|
class SetupUserInfoFragment : DialogFragment() {
|
||||||
private var account: Account? = null
|
private lateinit var account: Account
|
||||||
private var settings: AccountSettings? = null
|
private lateinit var settings: AccountSettings
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val progress = ProgressDialog(activity)
|
val progress = ProgressDialog(activity)
|
||||||
|
Loading…
Reference in New Issue
Block a user