Fix issue with result callback from gif search.

fork-5.53.8
Alex Hart 2022-01-25 13:34:32 -04:00
rodzic 3daa894988
commit 79a4ceedf9
2 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -3355,6 +3355,11 @@ public class ConversationParentFragment extends Fragment
}
}
@Override
public void openGifSearch() {
AttachmentManager.selectGif(this, ConversationParentFragment.PICK_GIF, isMms());
}
@Override
public void onGifSelectSuccess(@NonNull Uri blobUri, int width, int height) {
setMedia(blobUri,

Wyświetl plik

@ -9,13 +9,11 @@ import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.RecyclerView
import org.thoughtcrime.securesms.LoggingFragment
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.conversation.ConversationParentFragment
import org.thoughtcrime.securesms.giph.mp4.GiphyMp4Fragment
import org.thoughtcrime.securesms.giph.mp4.GiphyMp4SaveResult
import org.thoughtcrime.securesms.giph.mp4.GiphyMp4ViewModel
import org.thoughtcrime.securesms.keyboard.emoji.KeyboardPageSearchView
import org.thoughtcrime.securesms.keyboard.findListener
import org.thoughtcrime.securesms.mms.AttachmentManager
import org.thoughtcrime.securesms.util.views.SimpleProgressDialog
class GifKeyboardPageFragment : LoggingFragment(R.layout.gif_keyboard_page_fragment) {
@ -107,11 +105,12 @@ class GifKeyboardPageFragment : LoggingFragment(R.layout.gif_keyboard_page_fragm
}
private fun openGifSearch() {
AttachmentManager.selectGif(requireParentFragment(), ConversationParentFragment.PICK_GIF, host.isMms())
host.openGifSearch()
}
interface Host {
fun isMms(): Boolean
fun openGifSearch()
fun onGifSelectSuccess(blobUri: Uri, width: Int, height: Int)
}
}