changeListPublicStatus method
Returns true
on changing the status of the list to isPrivate
.
Implementation
Future<bool> changeListPublicStatus(bool isFollowing, bool isPrivate) async {
isFollowing
? following.isPrivate = isPrivate
: followers.isPrivate = isPrivate;
var atFollowsValue = AtFollowsValue()
..atKey = _formKey(isFollowing: isFollowing);
bool result = await this._sdkService.delete(
isFollowing ? following.getKey!.atKey : followers.getKey!.atKey);
isFollowing
? following.setKey = atFollowsValue
: followers.setKey = atFollowsValue;
String value = isFollowing ? following.toString() : followers.toString();
result = await this._sdkService.put(atFollowsValue.atKey, value);
await _sdkService.sync();
return result;
}