mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-17 21:06:48 +01:00
Xiaomi: fix logic for ability to select widget workout type
This commit is contained in:
parent
b31d98c7a0
commit
b9cbd14ffe
@ -104,8 +104,7 @@ public class XiaomiWidgetManager implements WidgetManager {
|
|||||||
type
|
type
|
||||||
);
|
);
|
||||||
|
|
||||||
// FIXME are there others?
|
if (widgetPart.getFunction() == 16) {
|
||||||
if (widgetPart.getId() == 2321) {
|
|
||||||
if (StringUtils.isBlank(newPart.getName())) {
|
if (StringUtils.isBlank(newPart.getName())) {
|
||||||
newPart.setName(GBApplication.getContext().getString(R.string.menuitem_workout));
|
newPart.setName(GBApplication.getContext().getString(R.string.menuitem_workout));
|
||||||
}
|
}
|
||||||
@ -170,8 +169,7 @@ public class XiaomiWidgetManager implements WidgetManager {
|
|||||||
newPart.setName(rawPart1.getTitle());
|
newPart.setName(rawPart1.getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME are there others?
|
if (widgetPart.getFunction() == 16) {
|
||||||
if (widgetPart.getId() == 2321) {
|
|
||||||
if (StringUtils.isBlank(newPart.getName())) {
|
if (StringUtils.isBlank(newPart.getName())) {
|
||||||
newPart.setName(GBApplication.getContext().getString(R.string.menuitem_workout));
|
newPart.setName(GBApplication.getContext().getString(R.string.menuitem_workout));
|
||||||
}
|
}
|
||||||
|
@ -253,11 +253,11 @@ message WidgetParts {
|
|||||||
|
|
||||||
message WidgetPart {
|
message WidgetPart {
|
||||||
optional uint32 type = 1; // 1 for small 1x1, 2 for wide 2x1, 3 for tall 1x2
|
optional uint32 type = 1; // 1 for small 1x1, 2 for wide 2x1, 3 for tall 1x2
|
||||||
optional uint32 app = 2; // matches command type
|
optional uint32 function = 2; // matches command type
|
||||||
optional uint32 id = 3; // they all seem unique
|
optional uint32 id = 3; // they all seem unique
|
||||||
optional string title = 4; // not set on create
|
optional string title = 4; // not set on create
|
||||||
optional uint32 subType = 5; // usually 0 if no subtype
|
optional uint32 subType = 5; // usually 0 if no subtype
|
||||||
optional string unknown6 = 6; // "" on get
|
optional string appId = 6; // "" on get
|
||||||
optional string unknown7 = 7; // "" on get
|
optional string unknown7 = 7; // "" on get
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user