updated update modal ui

This commit is contained in:
Nouman Tahir 2021-08-06 11:14:02 +05:00
parent b45f18118a
commit 05591b632f
5 changed files with 32 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 KiB

View File

@ -29,7 +29,7 @@ export default EStyleSheet.create({
imageStyle:{
marginTop:8,
height:150,
width:150,
width:'100%',
} as ImageStyle,
textContainer:{

View File

@ -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>

View File

@ -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?",

View File

@ -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) => {