Skip to content

Fix SwitchRow subtitles#1352

Merged
jasarien merged 1 commit into
Provenance-Emu:developfrom
dnicolson:fix-switchrow-subtitles
May 24, 2020
Merged

Fix SwitchRow subtitles#1352
jasarien merged 1 commit into
Provenance-Emu:developfrom
dnicolson:fix-switchrow-subtitles

Conversation

@dnicolson

@dnicolson dnicolson commented May 23, 2020

Copy link
Copy Markdown
Contributor

This pull request uses the display.description variable as the SwitchRow subtitle if available (like with the .multi option).

It is dependent on QuickTableViewController v1.2.2 which includes bcylin/QuickTableViewController#45 so Carthage must be updated.

Before:
Screen Shot 2020-05-22 at 19 15 20

After:
Screen Shot 2020-05-22 at 19 14 16

case let .bool(display, defaultValue):
return SwitchRow(text: display.title, detailText: .none, switchValue: core.valueForOption(Bool.self, option.key) ?? defaultValue, action: { _ in
let detailText: DetailText = display.description != nil ? DetailText.subtitle(display.description!) : .none
return SwitchRow(text: display.title, detailText: detailText, switchValue: core.valueForOption(Bool.self, option.key) ?? defaultValue, action: { _ in

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 169 characters (line_length)

switch option {
case let .bool(display, defaultValue):
return SwitchRow(text: display.title, detailText: .none, switchValue: core.valueForOption(Bool.self, option.key) ?? defaultValue, action: { _ in
let detailText: DetailText = display.description != nil ? DetailText.subtitle(display.description!) : .none

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 127 characters (line_length)

@dnicolson dnicolson marked this pull request as ready for review May 24, 2020 18:55
@jasarien jasarien merged commit 238fc5d into Provenance-Emu:develop May 24, 2020
@dnicolson dnicolson deleted the fix-switchrow-subtitles branch June 14, 2020 18:04
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