1
0
Fork 0

Fix crash for bookmarks

master
Tiger Oakes 2019-08-01 18:35:34 -04:00 committed by Emily Kager
parent d42e72fd8b
commit c342a680d8
3 changed files with 8 additions and 10 deletions

View File

@ -30,16 +30,16 @@ open class LibraryPageView(
protected fun setUiForNormalMode(title: String?) {
activity?.title = title
setToolbarColors(
ContextCompat.getColor(context, R.color.white_color),
context.getColorFromAttr(R.attr.accentHighContrast)
context.getColorFromAttr(R.attr.primaryText),
context.getColorFromAttr(R.attr.foundation)
)
}
protected fun setUiForSelectingMode(title: String?) {
activity?.title = title
setToolbarColors(
context.getColorFromAttr(R.attr.primaryText),
context.getColorFromAttr(R.attr.foundation)
ContextCompat.getColor(context, R.color.white_color),
context.getColorFromAttr(R.attr.accentHighContrast)
)
}

View File

@ -5,8 +5,8 @@
package org.mozilla.fenix.library.bookmarks
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.component_bookmark.view.*
import mozilla.appservices.places.BookmarkRoot
import mozilla.components.concept.storage.BookmarkNode
@ -130,9 +130,8 @@ class BookmarkView(
val interactor: BookmarkViewInteractor
) : LibraryPageView(container), BackHandler {
val view: LinearLayout = LayoutInflater.from(container.context)
val view: View = LayoutInflater.from(container.context)
.inflate(R.layout.component_bookmark, container, true)
.findViewById(R.id.bookmarks_wrapper)
var mode: BookmarkState.Mode = BookmarkState.Mode.Normal
private set

View File

@ -5,8 +5,8 @@
package org.mozilla.fenix.library.history
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.SimpleItemAnimator
@ -67,9 +67,8 @@ class HistoryView(
val interactor: HistoryInteractor
) : LibraryPageView(container), BackHandler {
val view: ConstraintLayout = LayoutInflater.from(container.context)
val view: View = LayoutInflater.from(container.context)
.inflate(R.layout.component_history, container, true)
.findViewById(R.id.history_wrapper)
private var items: List<HistoryItem> = listOf()
var mode: HistoryState.Mode = HistoryState.Mode.Normal