Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #94 from brave/staging
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
ayumi authored Jun 2, 2017
2 parents 9a77b91 + a24676c commit 6baa48c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ script:
- yarn check
- yarn browsertest
- yarn coverage
group: stable
dist: precise
dist: trusty
os: linux
addons:
apt:
Expand Down
5 changes: 3 additions & 2 deletions lib/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ message SyncRecord {
Site site = 1;
bool isFolder = 2;
bytes parentFolderObjectId = 3;
bytes previousObjectId = 4;
bytes nextObjectId = 5;
bytes previousObjectId = 4; // unused
bytes nextObjectId = 5; // unused
repeated string fields = 6;
bool hideInToolbar = 7;
}
message SiteSetting {
string hostPattern = 1;
Expand Down
19 changes: 19 additions & 0 deletions lib/api.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,12 @@
*/
Bookmark.prototype.fields = $util.emptyArray;

/**
* Bookmark hideInToolbar.
* @type {boolean|undefined}
*/
Bookmark.prototype.hideInToolbar = false;

// Lazily resolved type references
var $types = {
0: "api.SyncRecord.Site"
Expand Down Expand Up @@ -1646,6 +1652,8 @@
if (message.fields !== undefined && message.hasOwnProperty("fields"))
for (var i = 0; i < message.fields.length; ++i)
writer.uint32(/* id 6, wireType 2 =*/50).string(message.fields[i]);
if (message.hideInToolbar !== undefined && message.hasOwnProperty("hideInToolbar"))
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.hideInToolbar);
return writer;
};

Expand Down Expand Up @@ -1692,6 +1700,9 @@
message.fields = [];
message.fields.push(reader.string());
break;
case 7:
message.hideInToolbar = reader.bool();
break;
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -1743,6 +1754,9 @@
if (!$util.isString(message.fields[i]))
return "fields: string[] expected";
}
if (message.hideInToolbar !== undefined)
if (typeof message.hideInToolbar !== "boolean")
return "hideInToolbar: boolean expected";
return null;
};

Expand Down Expand Up @@ -1784,6 +1798,8 @@
for (var i = 0; i < object.fields.length; ++i)
message.fields[i] = String(object.fields[i]);
}
if (object.hideInToolbar !== undefined && object.hideInToolbar !== null)
message.hideInToolbar = Boolean(object.hideInToolbar);
return message;
};

Expand Down Expand Up @@ -1814,6 +1830,7 @@
object.parentFolderObjectId = options.bytes === String ? "" : [];
object.previousObjectId = options.bytes === String ? "" : [];
object.nextObjectId = options.bytes === String ? "" : [];
object.hideInToolbar = false;
}
if (message.site !== undefined && message.site !== null && message.hasOwnProperty("site"))
object.site = $types[0].toObject(message.site, options);
Expand All @@ -1830,6 +1847,8 @@
for (var j = 0; j < message.fields.length; ++j)
object.fields[j] = message.fields[j];
}
if (message.hideInToolbar !== undefined && message.hideInToolbar !== null && message.hasOwnProperty("hideInToolbar"))
object.hideInToolbar = message.hideInToolbar;
return object;
};

Expand Down
4 changes: 3 additions & 1 deletion test/client/recordUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const siteProps = {
const props = {
bookmark: {
isFolder: false,
hideInToolbar: true,
site: siteProps
},
historySite: siteProps,
Expand Down Expand Up @@ -406,7 +407,8 @@ test('recordUtil.syncRecordAsJS()', (t) => {
const bookmark = serializer.api.SyncRecord.Bookmark.create({
site,
isFolder: false,
parentFolderObjectId: testHelper.newUuid()
parentFolderObjectId: testHelper.newUuid(),
hideInToolbar: true
})
conversionEquals({ objectData: 'bookmark', bookmark })

Expand Down

0 comments on commit 6baa48c

Please sign in to comment.