show notification settings. handle blackListedOutpoints being null. #74

Merged
akinwale merged 1 commit from fcm-data into master 2019-11-01 06:54:02 +01:00
4 changed files with 55 additions and 52 deletions
Showing only changes of commit 51e3dfcf6a - Show all commits

View file

@ -66,7 +66,9 @@ class FileItem extends React.PureComponent {
let shouldHide = false; let shouldHide = false;
if (blackListedOutpoints || filteredOutpoints) { if (blackListedOutpoints || filteredOutpoints) {
const outpointsToHide = blackListedOutpoints.concat(filteredOutpoints); const outpointsToHide = !blackListedOutpoints
? filteredOutpoints
: blackListedOutpoints.concat(filteredOutpoints);
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout); shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
} }
if (shouldHide) { if (shouldHide) {

View file

@ -120,7 +120,9 @@ class FileListItem extends React.PureComponent {
shortChannelUri = signingChannel ? signingChannel.short_url : null; shortChannelUri = signingChannel ? signingChannel.short_url : null;
if (blackListedOutpoints || filteredOutpoints) { if (blackListedOutpoints || filteredOutpoints) {
const outpointsToHide = blackListedOutpoints.concat(filteredOutpoints); const outpointsToHide = !blackListedOutpoints
? filteredOutpoints
: blackListedOutpoints.concat(filteredOutpoints);
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout); shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
} }

View file

@ -105,8 +105,6 @@ class SettingsPage extends React.PureComponent {
</View> </View>
</View> </View>
{false && (
<View>
<View style={settingsStyle.sectionDivider} /> <View style={settingsStyle.sectionDivider} />
<Text style={settingsStyle.sectionTitle}>{__('Notifications')}</Text> <Text style={settingsStyle.sectionTitle}>{__('Notifications')}</Text>
<Text style={settingsStyle.sectionDescription}> <Text style={settingsStyle.sectionDescription}>
@ -142,7 +140,7 @@ class SettingsPage extends React.PureComponent {
<View style={settingsStyle.row}> <View style={settingsStyle.row}>
<View style={settingsStyle.switchText}> <View style={settingsStyle.switchText}>
<Text style={settingsStyle.label}>{__('Tags you follow')}</Text> <Text style={settingsStyle.label}>{__('Content Interests')}</Text>
</View> </View>
<View style={settingsStyle.switchContainer}> <View style={settingsStyle.switchContainer}>
<Switch <Switch
@ -153,8 +151,6 @@ class SettingsPage extends React.PureComponent {
/> />
</View> </View>
</View> </View>
</View>
)}
{false && ( {false && (
<View style={settingsStyle.row}> <View style={settingsStyle.row}>

View file

@ -158,7 +158,10 @@ class SplashScreen extends React.PureComponent {
NativeModules.VersionInfo.getAppVersion().then(appVersion => { NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true }); this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken() NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => authenticate(appVersion, Platform.OS, firebaseToken)) .then(firebaseToken => {
console.log(firebaseToken);
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS)); .catch(() => authenticate(appVersion, Platform.OS));
}); });
} }