Show the back side by default for those without write access.

This commit is contained in:
Ian Gulliver
2015-12-30 19:12:35 -08:00
parent 7584855c42
commit 619a9086bc

View File

@@ -92,6 +92,11 @@ BabyStats.prototype.onChatReady_ = function(chat) {
this.gridHeightCells_ = grid.gridHeightCells;
this.buildGrid_();
if (!this.chat_.amWriter()) {
// Start on back side if we're read-only.
this.flipperRule_.style.transform = 'rotateY(180deg)';
}
var messages = this.chat_.getMessages();
messages.forEach(this.handleMessage_.bind(this, false));
this.chat_.addEventListener('message', this.onMessage_.bind(this));