Skip to content

Commit

Permalink
Convert TabViewModel to kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
nutellarlz committed Sep 8, 2017
1 parent 58be7a9 commit ce68d89
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 47 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.jtechme.jumpgo.browser.fragment

/**
* Created by joeho on 9/8/2017.
*/

import android.graphics.Bitmap

import com.jtechme.jumpgo.view.LightningView

/**
* A view model representing the visual state of a tab.
*/
internal class TabViewModel(private val mLightningView: LightningView) {
val title: String
val favicon: Bitmap
val isForegroundTab: Boolean

init {
title = mLightningView.title
favicon = mLightningView.favicon
isForegroundTab = mLightningView.isForegroundTab
}

override fun equals(obj: Any?): Boolean {
return obj is TabViewModel && obj.mLightningView == mLightningView
}
}

0 comments on commit ce68d89

Please sign in to comment.