Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch push notification lib #346

Merged
merged 38 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b9b5733
Changed the way we read RocketChat settings since setting.type won't …
diegolmello Jun 13, 2018
a39c859
Permissions
diegolmello Jun 13, 2018
e5903ae
Unnecessary action sheet render
diegolmello Jun 13, 2018
c5f84e1
Update gradle
diegolmello Jun 14, 2018
8e9ea5c
Switched testServer to use blob
diegolmello Jun 14, 2018
ea952b7
Merge branch 'settings-fix' into update-sdk-version
diegolmello Jun 15, 2018
955a614
RoomsListHeader search fixed
diegolmello Jun 15, 2018
4c8fb16
Runs loadMessagesForRoom only if room has at least 20 rows
diegolmello Jun 15, 2018
c8aab3d
- Logout if user's token expired
diegolmello Jun 18, 2018
32c4193
- Animations disabled
diegolmello Jun 18, 2018
43bc745
Merge branch 'develop' into update-sdk-version
diegolmello Jun 18, 2018
0fab2ae
Tests updated
diegolmello Jun 18, 2018
7c6e419
react-native-navigation installed
diegolmello Jun 19, 2018
bcdf90e
Routes working
diegolmello Jun 21, 2018
c9813da
Tests passing
diegolmello Jun 22, 2018
ce63882
fix: package.json & .snyk to reduce vulnerabilities
snyk-bot Jun 22, 2018
db890f5
Setting android
diegolmello Jun 22, 2018
acf68db
Polyfill
diegolmello Jun 22, 2018
6c2d894
Switched to react-native-navigation v1
diegolmello Jun 25, 2018
883f421
Deep linking
diegolmello Jun 26, 2018
cee47dc
Push notifications
diegolmello Jun 26, 2018
1ead97a
Merge branch 'develop' into navigation
diegolmello Jun 26, 2018
e358f82
Room search android
diegolmello Jun 27, 2018
ee00603
Splash
diegolmello Jun 27, 2018
9704165
Start app refatored
diegolmello Jun 28, 2018
9224cab
Detox
diegolmello Jun 28, 2018
d1497da
OAuth now uses react-native-navigator modal
diegolmello Jun 28, 2018
30a349d
react-native-splash-screen removed
diegolmello Jun 28, 2018
7106ab4
react-navigation removed
diegolmello Jun 28, 2018
ac79004
Redux performance
diegolmello Jun 28, 2018
1259650
Switched back to @connect decorator
diegolmello Jun 29, 2018
d0a9d01
react-native-notifications configured
diegolmello Jun 29, 2018
b45cf11
fix: .snyk & package.json to reduce vulnerabilities
snyk-bot Jul 2, 2018
d68c69a
Push working
diegolmello Jul 3, 2018
e6220a5
Dependencies updated
diegolmello Jul 4, 2018
d1c5df8
Merge branch 'snyk-fix-eqf4g6' into push-notification
diegolmello Jul 4, 2018
83b1272
Merge branch 'snyk-fix-ab1cd90e' into push-notification
diegolmello Jul 4, 2018
54085b7
Duplicate google repo buildscript removed
diegolmello Jul 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Push notifications
  • Loading branch information
diegolmello committed Jun 26, 2018
commit cee47dcc45b67c4e243a03ed0b96ffcce3d392eb
1 change: 0 additions & 1 deletion app/lib/createStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import reducers from '../reducers';
import sagas from '../sagas';

const createStore = __DEV__ ? Reactotron.createStore : reduxCreateStore;
// const createStore = reduxCreateStore;
let sagaMiddleware;
let enhancers;

Expand Down
2 changes: 1 addition & 1 deletion app/lib/rocketchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ const RocketChat = {
this.ddp.on('disconnected', () => console.log('disconnected'));

this.ddp.on('logged', protectedFunction((user) => {
this.getRooms().catch(e => log('logged getRooms', e));
this.loginSuccess(user);
this.getRooms().catch(e => log('logged getRooms', e));
}));
this.ddp.once('logged', protectedFunction(({ id }) => {
this.subscribeRooms(id);
Expand Down
17 changes: 10 additions & 7 deletions app/push.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import PushNotification from 'react-native-push-notification';
import { AsyncStorage } from 'react-native';
import EJSON from 'ejson';
import { goRoom } from './containers/routes/NavigationService';

import { NavigationActions } from './Navigation';

const handleNotification = (notification) => {
if (!notification.userInteraction) {
return;
if (notification.userInteraction) {
const {
rid, name, sender, type
} = EJSON.parse(notification.ejson || notification.data.ejson);
NavigationActions.push({
screen: 'RoomView',
passProps: { rid, name: type === 'd' ? sender.username : name }
});
}
const {
rid, name, sender, type
} = EJSON.parse(notification.ejson || notification.data.ejson);
return rid && goRoom({ rid, name: type === 'd' ? sender.username : name });
};
PushNotification.configure({

Expand Down
1 change: 0 additions & 1 deletion app/views/ForgotPasswordView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Text, View, SafeAreaView, ScrollView } from 'react-native';
import { connect } from 'react-redux';
import { Navigation } from 'react-native-navigation';

import LoggedView from './View';
import { forgotPasswordInit, forgotPasswordRequest } from '../actions/login';
Expand Down
9 changes: 9 additions & 0 deletions index.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'babel-polyfill';
import 'regenerator-runtime/runtime';

import './app/ReactotronConfig';
import './app/push';

const { start } = require('./app/index');

start();
9 changes: 1 addition & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import 'babel-polyfill';
import 'regenerator-runtime/runtime';
// import { AppRegistry, UIManager } from 'react-native';

import './app/ReactotronConfig';
// import './app/push';
// import RocketChat from './app/index';
import './app/push';

// UIManager.setLayoutAnimationEnabledExperimental(true);

// AppRegistry.registerComponent('RocketChatRN', () => RocketChat);

// require('./playground/index');
const { start } = require('./app/index');

start();