Baseflow / Baseflow/Chameleon

Duplicate OnCreate on startup when theme is selected

Open
#103 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
153
Forks
28
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report
When a theme is selected, MainActivity.OnCreate is called twice upon startup. That results in 2x initialization, and end result is that the RootPage will show a back button, which when tapped, goes back to an empty tab page.

### Expected behavior
Don't initialize app twice when a theme is selected.

### Reproduction steps
1. Select a different theme than "Auto"
2. Close app (properly)
3. Open app again.
3.a. Back button should now be showing
4. Tap back button
5. Now you're stuck on an empty tab page, without being able to navigate further in the app. You have to close it and reopen.

### Configuration
I only tested Android. Might be an issue on other platforms too.

**Platform:**
- [ ] :iphone: iOS
- [x] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [ ] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Research direction

Start at the Android MainActivity.OnCreate entry point and reproduce the issue by selecting a non-Auto theme, closing the app, and reopening it. Trace why startup initialization occurs twice and verify that the RootPage no longer shows a back button or leads to an empty tab page.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.