mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-11 13:11:01 +00:00
No issue - Fix compilation error caused by removed extension function.
This commit is contained in:
parent
58ccc64386
commit
b26e39906d
@ -11,15 +11,17 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
|
import androidx.core.view.doOnNextLayout
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
import kotlinx.android.synthetic.main.mozac_ui_tabcounter_layout.view.*
|
import kotlinx.android.synthetic.main.mozac_ui_tabcounter_layout.view.*
|
||||||
import kotlinx.android.synthetic.main.tab_preview.view.*
|
import kotlinx.android.synthetic.main.tab_preview.view.*
|
||||||
import mozilla.components.browser.thumbnails.loader.ThumbnailLoader
|
import mozilla.components.browser.thumbnails.loader.ThumbnailLoader
|
||||||
import mozilla.components.support.images.ext.loadIntoView
|
import mozilla.components.support.images.ImageLoadRequest
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.theme.ThemeManager
|
import org.mozilla.fenix.theme.ThemeManager
|
||||||
|
import kotlin.math.max
|
||||||
|
|
||||||
class TabPreview @JvmOverloads constructor(
|
class TabPreview @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
@ -60,6 +62,9 @@ class TabPreview @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun loadPreviewThumbnail(thumbnailId: String) {
|
fun loadPreviewThumbnail(thumbnailId: String) {
|
||||||
thumbnailLoader.loadIntoView(previewThumbnail, thumbnailId)
|
doOnNextLayout {
|
||||||
|
val thumbnailSize = max(previewThumbnail.height, previewThumbnail.width)
|
||||||
|
thumbnailLoader.loadIntoView(previewThumbnail, ImageLoadRequest(thumbnailId, thumbnailSize))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user