Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c3de590 authored by alperozturk's avatar alperozturk Committed by backportbot[bot]
Browse files

requireContext crash

parent 8130fe84
Loading
Loading
Loading
Loading
+16 −14
Original line number Original line Diff line number Diff line
@@ -188,9 +188,10 @@ class NoteDirectEditFragment : BaseNoteFragment(), Branded {


    private fun loadNoteInWebView(note: Note) {
    private fun loadNoteInWebView(note: Note) {
        Log.d(TAG, "loadNoteInWebView() called")
        Log.d(TAG, "loadNoteInWebView() called")
        val directEditingRepository =

            DirectEditingRepository.getInstance(requireContext().applicationContext)
        context?.let { context ->
        val urlDisposable = directEditingRepository.getDirectEditingUrl(account, note)
            val repository = DirectEditingRepository.getInstance(context)
            val urlDisposable = repository.getDirectEditingUrl(account, note)
                .observeOn(AndroidSchedulers.mainThread()).subscribe({ url ->
                .observeOn(AndroidSchedulers.mainThread()).subscribe({ url ->
                    url?.let {
                    url?.let {
                        if (BuildConfig.DEBUG) {
                        if (BuildConfig.DEBUG) {
@@ -204,6 +205,7 @@ class NoteDirectEditFragment : BaseNoteFragment(), Branded {
                })
                })
            disposables.add(urlDisposable)
            disposables.add(urlDisposable)
        }
        }
    }


    private fun handleLoadError() {
    private fun handleLoadError() {
        val snackbar = BrandedSnackbar.make(
        val snackbar = BrandedSnackbar.make(