6616df4a82
Steps to reproduce: Open the dialog to set a catption on an image. Rotate the screen. <details> <summary>Stacktrace</summary> ``` Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at com.keylesspalace.tusky.components.compose.dialog.CaptionDialog.onCreateView (CaptionDialog.kt:61) at androidx.fragment.app.Fragment.performCreateView (Fragment.java:3114) at androidx.fragment.app.DialogFragment.performCreateView (DialogFragment.java:775) at androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:557) at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:272) at androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:114) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1455) at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:3034) at androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2952) at androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:263) at androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:350) at androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:251) at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1543) at android.app.Activity.performStart (Activity.java:8682) at android.app.ActivityThread.handleStartActivity (ActivityThread.java:4219) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2584) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:226) at android.os.Looper.loop (Looper.java:313) at android.app.ActivityThread.main (ActivityThread.java:8810) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067) ``` </details> Restoring the saved caption after the view was created fixes the problem. |
||
---|---|---|
.. | ||
schemas/com.keylesspalace.tusky.db.AppDatabase | ||
src | ||
build.gradle | ||
getGitSha.gradle | ||
lint-baseline.xml | ||
lint.xml | ||
proguard-rules.pro |