Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(() =>
xs.fromPromise(
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,
{
title: 'Allow locating via Bluetooth?',
message:
'Manyverse needs to use Bluetooth to discover where you are ' +
'("coarse location") and what peers are around you.',
buttonPositive: 'Yes',
buttonNegative: 'No',
},
),
),
)
.map(([token]) => xs.fromPromise(this.userAdapter.setUserFromIdentityToken(token)))
.flatten()
.map(([page, limit]) =>
xs.fromPromise(this.userAdapter.getBlockedUser(page, limit))
)
.map(promise => xs.fromPromise(promise))
.flatten();
.map(username =>
xs.fromPromise(
fetch(`https://api.github.com/users/${username}`).then(res =>
res.json()
)
)
)
public showPicker(
title?: string,
content?: string,
options?: OptionsPicker,
): Stream {
return xs.fromPromise(DialogAndroid.showPicker(title, content, options));
}
.map(({ roomId, name, avatarUrl, extras }) =>
xs.fromPromise(this.roomAdapter.updateRoom(roomId, name, avatarUrl, extras))
)
.map(([userId, userKey, username, avatarUrl, extras]) =>
xs.fromPromise(
this.userAdapter.login(userId, userKey, {
name: username,
avatarUrl,
extras
})
)
)
.map(([username, avatarUrl, extras]) =>
xs.fromPromise(this.userAdapter.updateUser(username, avatarUrl, extras))
)
.map(([uniqueId, name, avatarUrl, extras]) =>
xs.fromPromise(this.roomAdapter.getChannel(uniqueId, name, avatarUrl, extras))
)