Skip to content
Next
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
232
Merge Requests
19
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
22311a3edfd3d844aed9c76d45e84aff5eb1d740...b2e21dbaa4d71bf8cc5eaa5e141228a4c3171f50
Source
b2e21dbaa4d71bf8cc5eaa5e141228a4c3171f50
...
Target
22311a3edfd3d844aed9c76d45e84aff5eb1d740
Compare
Commits (4)
(fix) remove deprecated componentWillMount in discovery
· 94a16aec
Martin Santangelo
authored
3 days ago
94a16aec
(feat) install push notification package
· 88ed01a2
Martin Santangelo
authored
4 hours ago
88ed01a2
(feat) fix ios initial push route handling
· dd72554c
Martin Santangelo
authored
1 hour ago
dd72554c
(feat) image viewer using reanimated
· b2e21dba
Martin Santangelo
authored
9 minutes ago
b2e21dba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
523 additions
and
47 deletions
+523
-47
App.js
View file @
b2e21dba
...
...
@@ -11,7 +11,6 @@ import React, {
}
from
'
react
'
;
import
{
Observer
,
Provider
,
}
from
'
mobx-react/native
'
;
// import from mobx-react/native instead of mobx-react fix test
...
...
@@ -24,10 +23,10 @@ import {
Linking
,
Text
,
Alert
,
Clipboard
Clipboard
,
}
from
'
react-native
'
;
import
FlashMessage
from
"
react-native-flash-message
"
;
import
FlashMessage
from
'
react-native-flash-message
'
;
import
KeychainModalScreen
from
'
./src/keychain/KeychainModalScreen
'
;
import
BlockchainTransactionModalScreen
from
'
./src/blockchain/transaction-modal/BlockchainTransactionModalScreen
'
;
...
...
@@ -35,7 +34,7 @@ import NavigationStack from './src/navigation/NavigationStack';
import
stores
from
'
./AppStores
'
;
import
'
./AppErrors
'
;
import
'
./src/common/services/socket.service
'
;
//
import pushService from './src/common/services/push.service'; //TODO: fix for 0.61
import
pushService
from
'
./src/common/services/push.service
'
;
//TODO: fix for 0.61
import
mindsService
from
'
./src/common/services/minds.service
'
;
import
featureService
from
'
./src/common/services/features.service
'
;
import
receiveShare
from
'
./src/common/services/receive-share.service
'
;
...
...
@@ -43,9 +42,9 @@ import sessionService from './src/common/services/session.service';
import
deeplinkService
from
'
./src/common/services/deeplinks-router.service
'
;
import
badgeService
from
'
./src/common/services/badge.service
'
;
import
authService
from
'
./src/auth/AuthService
'
;
import
NotificationsService
from
"
./src/notifications/NotificationsService
"
;
import
NotificationsService
from
'
./src/notifications/NotificationsService
'
;
import
getMaches
from
'
./src/common/helpers/getMatches
'
;
import
{
CODE_PUSH_TOKEN
,
GOOGLE_PLAY_STORE
}
from
'
./src/config/Config
'
;
import
{
GOOGLE_PLAY_STORE
}
from
'
./src/config/Config
'
;
import
updateService
from
'
./src/common/services/update.service
'
;
import
ErrorBoundary
from
'
./src/common/components/ErrorBoundary
'
;
import
{
CommonStyle
as
CS
}
from
'
./src/styles/Common
'
;
...
...
@@ -64,7 +63,7 @@ import apiService from './src/common/services/api.service';
let
deepLinkUrl
=
''
;
// init push service
//
pushService.init(); //TODO: fix for 0.61
pushService
.
init
();
//TODO: fix for 0.61
// fire sqlite init
sqliteStorageProviderService
.
get
();
...
...
@@ -90,7 +89,7 @@ sessionService.onLogin(async () => {
// register device token into backend on login
// pushService.registerToken(); //TODO: fix for 0.61
pushService
.
registerToken
();
// get onboarding progress
const
onboarding
=
results
[
1
];
...
...
@@ -118,7 +117,7 @@ sessionService.onLogin(async () => {
}
// handle initial notifications (if the app is opened by tap on one)
// pushService.handleInitialNotification(); //TODO: fix for 0.61
pushService
.
handleInitialNotification
();
// handle shared
receiveShare
.
handle
();
...
...
This diff is collapsed.
android/app/build.gradle
View file @
b2e21dba
...
...
@@ -135,6 +135,7 @@ android {
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
Integer
.
parseInt
(
project
.
versionCode
)
versionName
project
.
versionName
missingDimensionStrategy
"RNNotifications.reactNativeVersion"
,
"reactNative60"
}
signingConfigs
{
debug
{
...
...
@@ -197,7 +198,7 @@ dependencies {
implementation
project
(
':tipsi-stripe'
)
// implementation project(':react-native-
notifications')
implementation
project
(
':reactnative
notifications'
)
implementation
project
(
':rn-apk'
)
...
...
This diff is collapsed.
android/app/src/main/java/com/minds/mobile/MainApplication.java
View file @
b2e21dba
...
...
@@ -7,7 +7,8 @@ import com.facebook.react.PackageList;
import
com.facebook.react.ReactApplication
;
import
com.bitgo.randombytes.RandomBytesPackage
;
// import com.wix.reactnativenotifications.RNNotificationsPackage;
import
com.wix.reactnativenotifications.RNNotificationsPackage
;
import
com.minds.crypto.CryptoPackage
;
import
com.facebook.react.ReactNativeHost
;
import
com.facebook.react.ReactPackage
;
...
...
@@ -31,6 +32,7 @@ public class MainApplication extends Application implements ShareApplication, Re
protected
List
<
ReactPackage
>
getPackages
()
{
@SuppressWarnings
(
"UnnecessaryLocalVariable"
)
List
<
ReactPackage
>
packages
=
new
PackageList
(
this
).
getPackages
();
packages
.
add
(
new
RNNotificationsPackage
(
this
.
getApplication
()));
return
packages
;
}
...
...
This diff is collapsed.
android/settings.gradle
View file @
b2e21dba
...
...
@@ -17,6 +17,8 @@ include ':react-native-video-exoplayer'
project
(
':react-native-video-exoplayer'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-video/android'
)
include
':react-native-exception-handler'
project
(
':react-native-exception-handler'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-exception-handler/android'
)
include
':reactnativenotifications'
project
(
':reactnativenotifications'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-notifications/android/app'
)
apply
from:
file
(
"../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"
);
applyNativeModulesSettingsGradle
(
settings
)
include
':app'
This diff is collapsed.
ios/Minds/AppDelegate.m
View file @
b2e21dba
...
...
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
#import "RNNotifications.h"
#import "AppDelegate.h"
#import <React/RCTBridge.h>
...
...
@@ -28,6 +29,7 @@
rootViewController
.
view
=
rootView
;
self
.
window
.
rootViewController
=
rootViewController
;
[
self
.
window
makeKeyAndVisible
];
[
RNNotifications
startMonitorNotifications
];
return
YES
;
}
...
...
@@ -54,4 +56,14 @@
continueUserActivity:
userActivity
restorationHandler:
restorationHandler
];
}
// Required to register for notifications
-
(
void
)
application
:(
UIApplication
*
)
application
didRegisterForRemoteNotificationsWithDeviceToken
:(
NSData
*
)
deviceToken
{
[
RNNotifications
didRegisterForRemoteNotificationsWithDeviceToken
:
deviceToken
];
}
-
(
void
)
application
:(
UIApplication
*
)
application
didFailToRegisterForRemoteNotificationsWithError
:(
NSError
*
)
error
{
[
RNNotifications
didFailToRegisterForRemoteNotificationsWithError
:
error
];
}
@end
This diff is collapsed.
package.json
View file @
b2e21dba
...
...
@@ -57,6 +57,7 @@
"
react-native-minds-encryption
"
:
"
Minds/react-native-minds-encryption#736571522c9d5f96c9bc4b454b2828e3940b6ccc
"
,
"
react-native-modal
"
:
"
^11.4.0
"
,
"
react-native-modal-datetime-picker
"
:
"
^7.6.0
"
,
"
react-native-notifications
"
:
"
Minds/react-native-notifications.git
"
,
"
react-native-phone-input
"
:
"
thegamenicorus/react-native-phone-input#6ab1a91a09ddd4272fe85e30ecedf092f0fcb1a7
"
,
"
react-native-progress
"
:
"
^3.6.0
"
,
"
react-native-qrcode-svg
"
:
"
^5.2.0
"
,
...
...
This diff is collapsed.
react-native.config.js
View file @
b2e21dba
module
.
exports
=
{
dependencies
:
{
'
react-native-notifications
'
:
{
platforms
:
{
android
:
null
},
},
'
tipsi-stripe
'
:
{
platforms
:
{
ios
:
null
,
// disable ios platform, other platforms will still autolink if provided
...
...
This diff is collapsed.
src/common/components/ImageViewer.js
0 → 100644
View file @
b2e21dba
This diff is collapsed.
Click to expand it.
src/common/components/MediaView.js
View file @
b2e21dba
...
...
@@ -307,7 +307,7 @@ export default class MediaView extends Component {
this
.
openLink
();
}
else
{
const
source
=
this
.
props
.
entity
.
getThumbSource
(
'
xlarge
'
);
this
.
props
.
navigation
.
push
(
'
ViewImage
'
,
{
source
});
this
.
props
.
navigation
.
push
(
'
ViewImage
'
,
{
source
,
entity
:
this
.
props
.
entity
});
}
}
...
...
This diff is collapsed.
src/common/services/push/ios-platform.js
View file @
b2e21dba
...
...
@@ -45,7 +45,15 @@ export default class IosPlatfom extends AbstractPlatform {
/**
* Handle the notification that open the app
*/
handleInitialNotification
()
{
async
handleInitialNotification
()
{
try
{
const
notification
=
await
NotificationsIOS
.
getInitialNotification
();
if
(
notification
&&
this
.
onInitialNotification
)
{
this
.
onInitialNotification
(
notification
);
}
}
catch
(
err
)
{
logService
.
exception
(
'
[PushService]
'
,
err
);
}
}
/**
...
...
@@ -81,6 +89,6 @@ export default class IosPlatfom extends AbstractPlatform {
// code: 3010,
// localizedDescription: 'remote notifications are not supported in the simulator'
// }
logService
.
e
xception
(
error
);
logService
.
e
rror
(
error
.
localizedDescription
);
}
}
\ No newline at end of file
}
This diff is collapsed.
src/discovery/DiscoveryScreen.js
View file @
b2e21dba
...
...
@@ -86,10 +86,26 @@ export default class DiscoveryScreen extends Component {
}
}
/**
* constructor
*/
constructor
(
props
)
{
super
(
props
);
this
.
props
.
discovery
.
init
();
const
params
=
this
.
props
.
navigation
.
state
.
params
;
if
(
params
&&
params
.
type
)
{
this
.
props
.
discovery
.
filters
.
setType
(
params
.
type
);
}
this
.
tileError
=
i18n
.
t
(
'
error
'
);
}
/**
* On component will mount
*/
component
Will
Mount
()
{
component
Did
Mount
()
{
// load data on enter
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didFocus
'
,
(
s
)
=>
{
setTimeout
(()
=>
{
...
...
@@ -103,15 +119,6 @@ export default class DiscoveryScreen extends Component {
this
.
setState
({
active
:
false
});
},
50
);
});
this
.
props
.
discovery
.
init
();
const
params
=
this
.
props
.
navigation
.
state
.
params
;
if
(
params
&&
params
.
type
)
{
this
.
props
.
discovery
.
filters
.
setType
(
params
.
type
);
}
this
.
tileError
=
i18n
.
t
(
'
error
'
);
}
/**
...
...
This diff is collapsed.
src/media/ViewImageScreen.js
View file @
b2e21dba
...
...
@@ -4,19 +4,18 @@ import React, {
import
{
View
,
Dimensions
,
Image
,
StatusBar
,
StyleSheet
,
Dimensions
,
Platform
,
}
from
'
react-native
'
;
import
Icon
from
'
react-native-vector-icons/Ionicons
'
;
import
PhotoView
from
'
react-native-photo-view
'
;
//
import PhotoView from 'react-native-photo-view';
import
{
CommonStyle
}
from
'
../styles/Common
'
;
import
testID
from
'
../common/helpers/testID
'
;
import
ImageViewer
from
'
../common/components/ImageViewer
'
;
/**
* Full screen image viewer
...
...
@@ -24,21 +23,30 @@ import testID from '../common/helpers/testID';
export
default
class
ViewImageScreen
extends
Component
{
static
navigationOptions
=
({
navigation
})
=>
({
header
:
(
<
View
style
=
{
styles
.
header
}
>
<
Icon
size
=
{
36
}
name
=
"
ios-close
"
onPress
=
{()
=>
navigation
.
goBack
()}
style
=
{
styles
.
iconclose
}
{...
testID
(
'
Go back button
'
)}
/
>
<
/View
>
),
transitionConfig
:
{
isModal
:
true
}
})
});
constructor
(
props
)
{
super
(
props
);
const
custom_data
=
this
.
props
.
navigation
.
state
.
params
.
entity
.
custom_data
;
const
width
=
Dimensions
.
get
(
'
window
'
).
width
;
let
height
=
300
;
if
(
custom_data
&&
custom_data
[
0
].
height
&&
custom_data
[
0
].
height
!=
'
0
'
)
{
let
ratio
=
custom_data
[
0
].
height
/
custom_data
[
0
].
width
;
height
=
width
*
ratio
;
}
this
.
state
=
{
width
,
height
,
};
}
getSource
()
{
return
this
.
props
.
navigation
.
state
.
params
.
source
;
...
...
@@ -49,12 +57,13 @@ export default class ViewImageScreen extends Component {
const
source
=
this
.
getSource
();
return
(
<
PhotoView
source
=
{
source
}
minimumZoomScale
=
{
1
}
maximumZoomScale
=
{
3
}
androidScaleType
=
"
fitCenter
"
style
=
{[
CommonStyle
.
flexContainer
,
CommonStyle
.
backgroundBlack
]}
/
>
<
View
style
=
{[
CommonStyle
.
flexContainerCenter
,
CommonStyle
.
alignCenter
,
CommonStyle
.
backgroundBlack
]}
>
<
ImageViewer
source
=
{
source
}
width
=
{
this
.
state
.
width
}
height
=
{
this
.
state
.
height
}
/
>
<
/View
>
)
}
}
...
...
This diff is collapsed.
yarn.lock
View file @
b2e21dba
...
...
@@ -7548,6 +7548,13 @@ react-native-modal@^11.0.2, react-native-modal@^11.4.0:
prop-types "^15.6.2"
react-native-animatable "^1.3.1"
react-native-notifications@Minds/react-native-notifications.git:
version "2.0.6"
resolved "https://codeload.github.com/Minds/react-native-notifications/tar.gz/333e376f866a805f250cc68706d97ace503b948a"
dependencies:
core-js "^1.0.0"
uuid "^2.0.3"
react-native-phone-input@thegamenicorus/react-native-phone-input#6ab1a91a09ddd4272fe85e30ecedf092f0fcb1a7:
version "0.1.10"
resolved "https://codeload.github.com/thegamenicorus/react-native-phone-input/tar.gz/6ab1a91a09ddd4272fe85e30ecedf092f0fcb1a7"
...
...
@@ -9207,6 +9214,11 @@ uuid@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac"
uuid@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=
uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
...
...
This diff is collapsed.