Refine code style

This commit is contained in:
Mygod
2019-03-23 14:17:42 +08:00
committed by GitHub
parent f83f81120b
commit e30a09a6cf

View File

@@ -67,7 +67,7 @@ class ClientsFragment : Fragment(), MainScope by MainScope.Supervisor() {
override fun onClick(dialog: DialogInterface?, which: Int) { override fun onClick(dialog: DialogInterface?, which: Int) {
when (which) { when (which) {
DialogInterface.BUTTON_POSITIVE -> { DialogInterface.BUTTON_POSITIVE -> {
val newNickname = this@NicknameDialogFragment.dialog!!.findViewById<EditText>(android.R.id.edit).text val newNickname = this.dialog!!.findViewById<EditText>(android.R.id.edit).text
MacLookup.abort(arg.mac) MacLookup.abort(arg.mac)
GlobalScope.launch(Dispatchers.Unconfined) { GlobalScope.launch(Dispatchers.Unconfined) {
AppDatabase.instance.clientRecordDao.upsert(arg.mac) { nickname = newNickname } AppDatabase.instance.clientRecordDao.upsert(arg.mac) { nickname = newNickname }