Chromium Code Reviews
DescriptionLanguage settings: Fix unnecessarily shown move buttons
Each language in the list of enabled languages has a detail menu with options
like "move up" and "move down". Obviously some options should be hidden, e.g.
the top language's detail menu should not show "move up" or "move to top". This
was broken by me in crrev.com/2573643005.
Fix by comparing the Language object, whose identity never changes for a given
language. The breakage happened because the LanguageState object being compared
was now being copied to a new object.
In the future we should simplify language settings by flattening the Language
structure into the LanguageState structure instead of having "language.language"
be a thing.
BUG=682120
R=stevenjb@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2675453002
Cr-Commit-Position: refs/heads/master@{#447837}
Committed: https://chromium.googlesource.com/chromium/src/+/4fed887018309685829be2b323c799ff1bf13c60
Patch Set 1 #Patch Set 2 : prettier test #
Total comments: 2
Patch Set 3 : nit #
Messages
Total messages: 10 (5 generated)
|
|||||||||||||||||||||||||||||||||||||