mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
updated update modal ui
This commit is contained in:
parent
b45f18118a
commit
05591b632f
BIN
src/assets/phone-holding.png
Normal file
BIN
src/assets/phone-holding.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 818 KiB |
@ -29,7 +29,7 @@ export default EStyleSheet.create({
|
||||
imageStyle:{
|
||||
marginTop:8,
|
||||
height:150,
|
||||
width:150,
|
||||
width:'100%',
|
||||
} as ImageStyle,
|
||||
|
||||
textContainer:{
|
||||
|
@ -60,7 +60,10 @@ const ActionModalView = ({onClose, data}: ActionModalViewProps, ref) => {
|
||||
|
||||
<View style={styles.textContainer}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
<Text style={styles.bodyText}>{body}</Text>
|
||||
{!!body && (
|
||||
<Text style={styles.bodyText}>{body}</Text>
|
||||
)}
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
|
@ -411,7 +411,11 @@
|
||||
"something_wrong_alt": "Meanwhile, try Ecency.com from your Browser",
|
||||
"something_wrong_reload": "Try again?",
|
||||
"can_not_be_empty": "Title and body can not be empty!",
|
||||
"wrong_filter_count":"Please select 3 filters"
|
||||
"wrong_filter_count":"Please select 3 filters",
|
||||
"update_available_title":"Update available v{version}",
|
||||
"update_available_body":"Using latest version of Ecency gives you the best experience",
|
||||
"update": "Update Now",
|
||||
"remind_later": "Remind Later"
|
||||
},
|
||||
"post": {
|
||||
"reblog_alert": "Are you sure, you want to reblog?",
|
||||
|
@ -87,6 +87,7 @@ import {
|
||||
hideActionModal,
|
||||
setAvatarCacheStamp,
|
||||
setRcOffer,
|
||||
showActionModal,
|
||||
toastNotification,
|
||||
updateActiveBottomTab,
|
||||
} from '../../../redux/actions/uiAction';
|
||||
@ -176,8 +177,6 @@ class ApplicationContainer extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
this._compareRemoteVersion();
|
||||
|
||||
ReceiveSharingIntent.getReceivedFiles(
|
||||
() => {
|
||||
navigate({
|
||||
@ -354,11 +353,28 @@ class ApplicationContainer extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_compareRemoteVersion = async () => {
|
||||
_compareAndPromptForUpdate = async () => {
|
||||
const { dispatch, intl } = this.props;
|
||||
const remoteVersion = await fetchLatestAppVersion();
|
||||
|
||||
if (remoteVersion !== VersionNumber.appVersion) {
|
||||
Alert.alert('Update app version: ' + remoteVersion + '-----' + VersionNumber.appVersion);
|
||||
dispatch(
|
||||
showActionModal(
|
||||
intl.formatMessage({ id: 'alert.update_available_title' }, { version: remoteVersion }),
|
||||
intl.formatMessage({ id: 'alert.update_available_body' }),
|
||||
[
|
||||
{
|
||||
text: intl.formatMessage({ id: 'alert.remind_later' }),
|
||||
onPress: () => {},
|
||||
},
|
||||
{
|
||||
text: intl.formatMessage({ id: 'alert.update' }),
|
||||
onPress: () => {},
|
||||
},
|
||||
],
|
||||
require('../../../assets/phone-holding.png'),
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@ -416,7 +432,8 @@ class ApplicationContainer extends Component {
|
||||
isReady: true,
|
||||
});
|
||||
this._refreshGlobalProps();
|
||||
this._getUserDataFromRealm();
|
||||
await this._getUserDataFromRealm();
|
||||
this._compareAndPromptForUpdate();
|
||||
};
|
||||
|
||||
_pushNavigate = (notification) => {
|
||||
|
Loading…
Reference in New Issue
Block a user