Increase stories caption limit to 1500 grapheme clusters.

This commit is contained in:
Alex Hart
2022-09-19 14:24:44 -03:00
committed by Cody Henthorne
parent 654b602cef
commit 9326c1726a
14 changed files with 125 additions and 58 deletions

View File

@@ -3,10 +3,8 @@ package org.thoughtcrime.securesms.components
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.viewbinding.ViewBinding
import org.whispersystems.signalservice.api.util.Preconditions
import kotlin.reflect.KProperty
/**
@@ -18,8 +16,6 @@ class ViewBinderDelegate<T : ViewBinding>(private val bindingFactory: (View) ->
private var binding: T? = null
operator fun getValue(thisRef: Fragment, property: KProperty<*>): T {
Preconditions.checkState(thisRef.viewLifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.CREATED))
if (binding == null) {
thisRef.viewLifecycleOwner.lifecycle.addObserver(this@ViewBinderDelegate)
binding = bindingFactory(thisRef.requireView())