couple small tweaks here and there

This commit is contained in:
tibbi
2017-03-06 18:54:00 +01:00
parent 4acf5f5fd8
commit 9712fe249d
12 changed files with 11 additions and 10 deletions

View File

@ -3,7 +3,6 @@ package com.simplemobiletools.notes.dialogs
import android.app.Activity
import android.content.DialogInterface.BUTTON_POSITIVE
import android.support.v7.app.AlertDialog
import android.view.LayoutInflater
import android.view.WindowManager
import com.simplemobiletools.commons.extensions.setupDialogStuff
import com.simplemobiletools.commons.extensions.toast
@ -16,7 +15,7 @@ import kotlinx.android.synthetic.main.new_note.view.*
class RenameNoteDialog(val activity: Activity, val db: DBHelper, val note: Note, callback: (note: Note) -> Unit) {
init {
val view = LayoutInflater.from(activity).inflate(R.layout.rename_note, null)
val view = activity.layoutInflater.inflate(R.layout.rename_note, null)
view.note_name.setText(note.title)
AlertDialog.Builder(activity)

View File

@ -1,8 +1,4 @@
package com.simplemobiletools.notes.models
class Note(var id: Int, var title: String, var value: String, val type: Int) {
data class Note(var id: Int, var title: String, var value: String, val type: Int)
override fun equals(other: Any?) = other != null && this.toString() == other.toString()
override fun toString() = "Note {id=$id, title=$title, value=$value, type=$type}"
}