Skip to content

Commit

Permalink
Disable notifications screen refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
pmusaraj committed Jul 31, 2024
1 parent a43309f commit abe14e0
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions js/screens/NotificationsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ class NotificationsScreen extends React.Component {
connectedSites: 0,
};

this._onSiteChange = e => {
if (e.event === 'change') {
this.refresh();
this.setState({
connectedSites: this._siteManager.connectedSitesCount(),
});
}
};

this._siteManager = this.props.screenProps.siteManager;

if (this.props.screenProps.seenNotificationMap) {
Expand All @@ -48,8 +39,6 @@ class NotificationsScreen extends React.Component {
}

componentDidMount() {
this._siteManager.subscribe(this._onSiteChange);

this.setState({connectedSites: this._siteManager.connectedSitesCount()});
this._mounted = true;

Expand Down Expand Up @@ -77,7 +66,6 @@ class NotificationsScreen extends React.Component {
}

componentWillUnmount() {
this._siteManager.unsubscribe(this._onSiteChange);
this._mounted = false;
}

Expand All @@ -97,11 +85,7 @@ class NotificationsScreen extends React.Component {

return (
<SafeAreaView style={{flex: 1, backgroundColor: theme.background}}>
<Components.NavigationBar
onDidPressRightButton={() => this._onDidPressRightButton()}
onDidPressLeftButton={() => this._onDidPressLeftButton()}
progress={this.state.progress}
/>
<Components.NavigationBar progress={this.state.progress} />

{this._renderListHeader()}

Expand Down Expand Up @@ -162,14 +146,6 @@ class NotificationsScreen extends React.Component {
this.props.screenProps.openUrl(url);
}

_onDidPressLeftButton() {
this.refresh();
}

_onDidPressRightButton() {
this.props.navigation.goBack();
}

_listIndex(row) {
let rowData = row.toJS();
return rowData.notification.id.toString();
Expand Down

0 comments on commit abe14e0

Please sign in to comment.