Merge "Change default comment visibility to expand all recent comments"
This commit is contained in:
@@ -218,7 +218,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
p.getTimeFormat());
|
||||
relativeDateInChangeTable.setValue(p.isRelativeDateInChangeTable());
|
||||
setListBox(commentVisibilityStrategy,
|
||||
AccountGeneralPreferences.CommentVisibilityStrategy.EXPAND_MOST_RECENT,
|
||||
AccountGeneralPreferences.CommentVisibilityStrategy.EXPAND_RECENT,
|
||||
p.getCommentVisibilityStrategy());
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
AccountGeneralPreferences.TimeFormat.values()));
|
||||
p.setRelativeDateInChangeTable(relativeDateInChangeTable.getValue());
|
||||
p.setCommentVisibilityStrategy(getListBox(commentVisibilityStrategy,
|
||||
CommentVisibilityStrategy.EXPAND_MOST_RECENT,
|
||||
CommentVisibilityStrategy.EXPAND_RECENT,
|
||||
CommentVisibilityStrategy.values()));
|
||||
|
||||
enable(false);
|
||||
|
||||
@@ -408,7 +408,7 @@ public class ChangeScreen extends Screen
|
||||
final Timestamp aged = new Timestamp(System.currentTimeMillis() - AGE);
|
||||
|
||||
CommentVisibilityStrategy commentVisibilityStrategy =
|
||||
CommentVisibilityStrategy.EXPAND_MOST_RECENT;
|
||||
CommentVisibilityStrategy.EXPAND_RECENT;
|
||||
if (Gerrit.isSignedIn()) {
|
||||
commentVisibilityStrategy = Gerrit.getUserAccount()
|
||||
.getGeneralPreferences().getCommentVisibilityStrategy();
|
||||
@@ -443,16 +443,16 @@ public class ChangeScreen extends Screen
|
||||
switch (commentVisibilityStrategy) {
|
||||
case COLLAPSE_ALL:
|
||||
break;
|
||||
case EXPAND_RECENT:
|
||||
isOpen = isRecent;
|
||||
break;
|
||||
case EXPAND_ALL:
|
||||
isOpen = true;
|
||||
break;
|
||||
case EXPAND_MOST_RECENT:
|
||||
default:
|
||||
isOpen = i == msgList.size() - 1;
|
||||
break;
|
||||
case EXPAND_RECENT:
|
||||
default:
|
||||
isOpen = isRecent;
|
||||
break;
|
||||
}
|
||||
cp.setOpen(isOpen);
|
||||
comments.add(cp);
|
||||
|
||||
Reference in New Issue
Block a user