Skip to content

Fix exceptions causing render to fail in the layout editor.#967

Open
sampengilly wants to merge 1 commit into
prolificinteractive:masterfrom
sampengilly:feature/render-preview
Open

Fix exceptions causing render to fail in the layout editor.#967
sampengilly wants to merge 1 commit into
prolificinteractive:masterfrom
sampengilly:feature/render-preview

Conversation

@sampengilly

Copy link
Copy Markdown

My attempt at fixing #876

The main cause with calendarMode not being set was that an exception was occurring inside the state setup in the constructor, this exception was being swallowed by the try-catch block surrounding the setup logic.

The exception that was occurring in the state setup was the ThreeTen missing zone data one. By calling AndroidThreeTen.init(context) for edit mode at the beginning of the constructor this exception can be prevented.

Another exception that was occurring was due to a null previousMonth in the TitleChanger.

While this PR results in the calendar displaying in the layout editor, the dates displayed aren't a complete representation of the month, and the calendar mode isn't properly honoured.

The main cause with calendarMode not being set was that an exception was occurring inside the state setup in the constructor, this exception was being swallowed by the try-catch block surrounding the setup logic.

The exception that was occurring in the state setup was the ThreeTen missing zone data one. By calling `AndroidThreeTen.init(context)` for edit mode at the beginning of the constructor this exception can be prevented.

Another exception that was occurring was due to a null `previousMonth` in the `TitleChanger`.

While this PR results in the calendar displaying in the layout editor, the dates displayed aren't a complete representation of the month, and the calendar mode isn't properly honoured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants