merged with master

This commit is contained in:
u-e 2019-02-18 22:28:34 +03:00
commit 76a9d063c6
31 changed files with 155 additions and 143 deletions

View File

@ -3,10 +3,10 @@
platform :ios, '9.0'
target 'eSteem' do
pod 'AppCenter/Push', '~> 1.13.0'
pod 'AppCenter/Crashes', '~> 1.13.0'
pod 'AppCenter/Analytics', '~> 1.13.0'
pod 'AppCenterReactNativeShared', '~> 1.12.0'
pod 'AppCenter/Push', '~> 1.11.0'
pod 'AppCenter/Crashes', '~> 1.11.0'
pod 'AppCenter/Analytics', '~> 1.11.0'
pod 'AppCenterReactNativeShared', '~> 1.10.0'
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

View File

@ -1,13 +1,13 @@
PODS:
- AppCenter/Analytics (1.13.0):
- AppCenter/Analytics (1.11.0):
- AppCenter/Core
- AppCenter/Core (1.13.0)
- AppCenter/Crashes (1.13.0):
- AppCenter/Core (1.11.0)
- AppCenter/Crashes (1.11.0):
- AppCenter/Core
- AppCenter/Push (1.13.0):
- AppCenter/Push (1.11.0):
- AppCenter/Core
- AppCenterReactNativeShared (1.12.0):
- AppCenter/Core (= 1.13.0)
- AppCenterReactNativeShared (1.10.0):
- AppCenter/Core (= 1.11.0)
- Base64 (1.1.2)
- boost-for-react-native (1.63.0)
- CodePush (5.5.2):
@ -87,10 +87,10 @@ PODS:
- yoga (0.57.8.React)
DEPENDENCIES:
- AppCenter/Analytics (~> 1.13.0)
- AppCenter/Crashes (~> 1.13.0)
- AppCenter/Push (~> 1.13.0)
- AppCenterReactNativeShared (~> 1.12.0)
- AppCenter/Analytics (~> 1.11.0)
- AppCenter/Crashes (~> 1.11.0)
- AppCenter/Push (~> 1.11.0)
- AppCenterReactNativeShared (~> 1.10.0)
- CodePush (from `../node_modules/react-native-code-push`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
@ -144,8 +144,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
AppCenter: a70408f15de23f925001bfc7b7473094a009a4eb
AppCenterReactNativeShared: 542de3c68bcec89fba964213048287592a443976
AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2
AppCenterReactNativeShared: a77b000c2ac6dc2e44472621d7d0770f196e5822
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CodePush: 338a023972c64636503e8886cf4cb6ec27dd1c01
@ -164,6 +164,6 @@ SPEC CHECKSUMS:
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
yoga: 74cdf036c30820443b25ade59916236b1e95ee93
PODFILE CHECKSUM: 7e5e745ff42e44b918e4f17ac209c3b553d6be97
PODFILE CHECKSUM: 19ca750f5874376432380838891f13aaeecb302d
COCOAPODS: 1.6.0

View File

@ -6,7 +6,6 @@
#import "MSChannelGroupProtocol.h"
#import "MSChannelProtocol.h"
#import "MSConstants.h"
#import "MSCustomProperties.h"
#import "MSDevice.h"
#import "MSEnable.h"
#import "MSLog.h"
@ -16,3 +15,7 @@
#import "MSServiceAbstract.h"
#import "MSWrapperLogger.h"
#import "MSWrapperSdk.h"
#if !TARGET_OS_TV
#import "MSCustomProperties.h"
#endif

View File

@ -188,21 +188,4 @@
*/
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
/**
* Set the user identifier.
*
* @param userId User identifier.
*
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
* MSAppCenter:start:withServices: contains "target={targetToken}".
*
* The App Center backend currently do not yet use the user identifier so this API doesn't have a use case yet when the secret passed to @c
* MSAppCenter:start:withServices: contains an App Center application secret.
*
* For App Center backend the user identifier maximum length is 256 characters.
*
* AppCenter must be configured or started before this API can be used.
*/
+ (void)setUserId:(NSString *)userId;
@end

View File

@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
* (default is 4096 bytes). Values below 20480 bytes (20 KiB) will be ignored.
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise.
*/

View File

@ -25,11 +25,6 @@
*/
@property(nonatomic, copy) NSString *distributionGroupId;
/**
* Optional user identifier.
*/
@property(nonatomic, copy) NSString *userId;
/**
* Device properties associated to this log.
*/

View File

@ -25,14 +25,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)setAppLocale:(nullable NSString *)appLocale;
/**
* Set the user identifier.
* The user identifier needs to start with c: or i: or d: or w: prefixes.
*
* @param userId user identifier.
*/
- (void)setUserId:(nullable NSString *)userId;
/**
* Set a string event property to be attached to events tracked by this transmission target and its child transmission targets.
*

View File

@ -16,6 +16,4 @@
+ (void) setStartAutomatically:(BOOL)shouldStartAutomatically;
+ (NSDictionary *)getConfiguration;
@end

26
ios/Pods/Manifest.lock generated
View File

@ -1,13 +1,13 @@
PODS:
- AppCenter/Analytics (1.13.0):
- AppCenter/Analytics (1.11.0):
- AppCenter/Core
- AppCenter/Core (1.13.0)
- AppCenter/Crashes (1.13.0):
- AppCenter/Core (1.11.0)
- AppCenter/Crashes (1.11.0):
- AppCenter/Core
- AppCenter/Push (1.13.0):
- AppCenter/Push (1.11.0):
- AppCenter/Core
- AppCenterReactNativeShared (1.12.0):
- AppCenter/Core (= 1.13.0)
- AppCenterReactNativeShared (1.10.0):
- AppCenter/Core (= 1.11.0)
- Base64 (1.1.2)
- boost-for-react-native (1.63.0)
- CodePush (5.5.2):
@ -87,10 +87,10 @@ PODS:
- yoga (0.57.8.React)
DEPENDENCIES:
- AppCenter/Analytics (~> 1.13.0)
- AppCenter/Crashes (~> 1.13.0)
- AppCenter/Push (~> 1.13.0)
- AppCenterReactNativeShared (~> 1.12.0)
- AppCenter/Analytics (~> 1.11.0)
- AppCenter/Crashes (~> 1.11.0)
- AppCenter/Push (~> 1.11.0)
- AppCenterReactNativeShared (~> 1.10.0)
- CodePush (from `../node_modules/react-native-code-push`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
@ -144,8 +144,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"
SPEC CHECKSUMS:
AppCenter: a70408f15de23f925001bfc7b7473094a009a4eb
AppCenterReactNativeShared: 542de3c68bcec89fba964213048287592a443976
AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2
AppCenterReactNativeShared: a77b000c2ac6dc2e44472621d7d0770f196e5822
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CodePush: 338a023972c64636503e8886cf4cb6ec27dd1c01
@ -164,6 +164,6 @@ SPEC CHECKSUMS:
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
yoga: 74cdf036c30820443b25ade59916236b1e95ee93
PODFILE CHECKSUM: 7e5e745ff42e44b918e4f17ac209c3b553d6be97
PODFILE CHECKSUM: 19ca750f5874376432380838891f13aaeecb302d
COCOAPODS: 1.6.0

View File

@ -9,154 +9,154 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
<integer>10</integer>
</dict>
<key>AppCenterReactNativeShared.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
<integer>11</integer>
</dict>
<key>Base64.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
<integer>12</integer>
</dict>
<key>CodePush.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>13</integer>
<integer>14</integer>
</dict>
<key>DoubleConversion.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>14</integer>
<integer>15</integer>
</dict>
<key>FLAnimatedImage.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>15</integer>
<integer>16</integer>
</dict>
<key>Folly.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>16</integer>
<integer>17</integer>
</dict>
<key>JWT.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>18</integer>
<integer>19</integer>
</dict>
<key>Pods-eSteem-tvOS.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>20</integer>
<integer>21</integer>
</dict>
<key>Pods-eSteem-tvOSTests.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>21</integer>
<integer>22</integer>
</dict>
<key>Pods-eSteem.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>19</integer>
<integer>20</integer>
</dict>
<key>Pods-eSteemTests.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>22</integer>
<integer>23</integer>
</dict>
<key>QBImagePickerController-QBImagePicker.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>24</integer>
<integer>25</integer>
</dict>
<key>QBImagePickerController.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>23</integer>
<integer>24</integer>
</dict>
<key>RNImageCropPicker.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>27</integer>
<integer>28</integer>
</dict>
<key>RSKImageCropper.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>28</integer>
<integer>29</integer>
</dict>
<key>SDWebImage.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>29</integer>
<integer>30</integer>
</dict>
<key>SSZipArchive.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>30</integer>
<integer>31</integer>
</dict>
<key>boost-for-react-native.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
<integer>13</integer>
</dict>
<key>glog.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>17</integer>
<integer>18</integer>
</dict>
<key>react-native-fast-image.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>25</integer>
<integer>26</integer>
</dict>
<key>react-native-version-number.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>26</integer>
<integer>27</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

View File

@ -4,6 +4,11 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>eSteem-release.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>eSteem-tvOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>

View File

@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>707</string>
<string>777</string>
<key>CodePushDeploymentKey</key>
<string>13ThFZsgwk6UZp6mIe95IDbnfw8iHy1jfsn-E</string>
<key>LSRequiresIPhoneOS</key>
@ -57,7 +57,7 @@
<key>NSCameraUsageDescription</key>
<string>To access your photos, eSteem needs your permission to help you share your photos.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<string></string>
<key>NSMainNibFile</key>
<string>LaunchScreen</string>
<key>NSMicrophoneUsageDescription</key>

View File

@ -17,4 +17,7 @@ export default EStyleSheet.create({
fontSize: 12,
color: '$primaryDarkGray',
},
bold: {
fontWeight: '700',
},
});

View File

@ -27,12 +27,12 @@ class FormInputView extends PureComponent {
// Component Functions
render() {
const { description, iconName } = this.props;
const { description, iconName, bold } = this.props;
return (
<View style={styles.container}>
<Ionicons color="#c1c5c7" style={styles.infoIcon} name={iconName} />
<Text style={styles.infoText}>{description}</Text>
<Text style={[styles.infoText, bold && styles.bold]}>{description}</Text>
</View>
);
}

View File

@ -26,9 +26,9 @@ export default EStyleSheet.create({
marginTop: 19,
marginBottom: 10,
},
// marginFooter: {
// marginBottom: 50,
// },
marginFooter: {
marginBottom: 50,
},
footerText: {
fontSize: 10,
fontFamily: '$primaryFont',

View File

@ -29,28 +29,27 @@ class SideMenuContainer extends Component {
}
// Component Life Cycle Functions
componentWillMount() {
const { otherAccounts } = this.props;
this._createUserList(otherAccounts);
}
componentWillReceiveProps(nextProps) {
const { otherAccounts, isLoggedIn } = this.props;
const { isLoggedIn } = this.props;
if (isLoggedIn && otherAccounts !== nextProps.otherAccounts) {
if (isLoggedIn) {
this._createUserList(nextProps.otherAccounts);
}
}
_createUserList = (otherAccounts) => {
const { currentAccount } = this.props;
const accounts = [];
otherAccounts.forEach((element) => {
if (element.username !== currentAccount.name) {
accounts.push({
name: `@${element.username}`,
username: element.username,
id: element.username,
});
}
});
accounts.push({
name: 'Add Account',

View File

@ -36,7 +36,7 @@ class WalletView extends PureComponent {
? `${Math.round(walletData.rewardSteemBalance * 1000) / 1000} STEEM`
: ''}
{walletData.rewardSbdBalance
? ` ${Math.round(walletData.rewardSbdBalance * 1000) / 1000} SDB`
? ` ${Math.round(walletData.rewardSbdBalance * 1000) / 1000} SBD`
: ''}
{walletData.rewardVestingSteem
? ` ${Math.round(walletData.rewardVestingSteem * 1000) / 1000} SP`

View File

@ -78,7 +78,8 @@
"description": "User credentials are kept locally on the device. Credentials are removed upon logout!",
"cancel": "cancel",
"login": "LOGIN",
"steemconnect_description": "If you don't want to keep your password encrypted and saved on your device, you can use Steemconnect."
"steemconnect_description": "If you don't want to keep your password encrypted and saved on your device, you can use Steemconnect.",
"steemconnect_fee_description": "Steemconnect may charge some fees from your reward transactions"
},
"home": {
"feed": "Feed",

View File

@ -78,7 +78,8 @@
"description": "Kullanıçı bilgileri telefonunuz üzeründe şifreli olarak tutulur ve çıkış yaptıgınızda tüm bilgiler silinir.",
"cancel": "geç",
"login": "GİRİŞ",
"steemconnect_description": "Eğer kullanıçı bilgilerini şifreli olarak tutulmasını istemiyorsanız Steemconnect ilede giriş yapabilirsiniz."
"steemconnect_description": "Eğer kullanıçı bilgilerini şifreli olarak tutulmasını istemiyorsanız Steemconnect ilede giriş yapabilirsiniz.",
"steemconnect_fee_description": "Steemconnect, ödül işlemlerinden bazı ücretler alabilir."
},
"home": {
"feed": "Akış",

View File

@ -89,7 +89,7 @@ export const login = async (username, password) => {
await updateCurrentUsername(account.name);
return { ...account, password };
}
return Promise.reject(new Error('auth.invalid_pin'));
return Promise.reject(new Error('auth.invalid_credentials'));
};
export const loginWithSC2 = async (code) => {

View File

@ -8,6 +8,7 @@ import Config from 'react-native-config';
import AppCenter from 'appcenter';
import { NavigationActions } from 'react-navigation';
import { bindActionCreators } from 'redux';
import Push from 'appcenter-push';
// Constants
import en from 'react-intl/locale-data/en';
@ -228,15 +229,18 @@ class ApplicationContainer extends Component {
};
_getSettings = () => {
const { dispatch, actions } = this.props;
const { dispatch } = this.props;
getSettings().then((response) => {
if (response) {
if (response.isDarkTheme !== '') dispatch(isDarkTheme(response.isDarkTheme));
if (response.language !== '') dispatch(setLanguage(response.language));
if (response.notification !== '') dispatch(isNotificationOpen(response.notification));
if (response.server !== '') dispatch(setApi(response.server));
if (response.upvotePercent !== '') dispatch(setUpvotePercent(Number(response.upvotePercent)));
if (response.notification !== '') {
dispatch(isNotificationOpen(response.notification));
Push.setEnabled(response.notification);
}
dispatch(setCurrency(response.currency !== '' ? response.currency : 'usd'));
@ -267,7 +271,7 @@ class ApplicationContainer extends Component {
username,
token,
system: Platform.OS,
allows_notify: notificationSettings,
allows_notify: Number(notificationSettings),
};
setPushToken(data).then(() => {
setPushTokenSaved(true);
@ -278,17 +282,17 @@ class ApplicationContainer extends Component {
});
};
_logout = () => {
_logout = async () => {
const { otherAccounts, currentAccount, dispatch } = this.props;
removeUserData(currentAccount.name)
.then(() => {
await removeUserData(currentAccount.name)
.then(async () => {
const _otherAccounts = otherAccounts.filter(user => user.username !== currentAccount.name);
if (_otherAccounts.length > 0) {
const targetAccountUsername = _otherAccounts[0].username;
this._switchAccount(targetAccountUsername);
await this._switchAccount(targetAccountUsername);
} else {
dispatch(updateCurrentAccount({}));
dispatch(login(false));
@ -306,10 +310,10 @@ class ApplicationContainer extends Component {
.catch(() => {});
};
_switchAccount = (targetAccountUsername) => {
_switchAccount = async (targetAccountUsername) => {
const { dispatch } = this.props;
switchAccount(targetAccountUsername).then((accountData) => {
await switchAccount(targetAccountUsername).then((accountData) => {
const realmData = getUserDataWithUsername(targetAccountUsername);
const _currentAccount = accountData;
_currentAccount.username = accountData.name;
@ -331,7 +335,12 @@ class ApplicationContainer extends Component {
if (isRenderRequire && isReady) {
return (
<ApplicationScreen isConnected={isConnected} locale={selectedLanguage} toastNotification={toastNotification} {...this.props} />
<ApplicationScreen
isConnected={isConnected}
locale={selectedLanguage}
toastNotification={toastNotification}
{...this.props}
/>
);
}
return <Launch />;
@ -356,9 +365,9 @@ export default connect(
pinCode: state.account.pin,
// UI
toastNotification: state.ui.toastNotification
toastNotification: state.ui.toastNotification,
}),
(dispatch, props) => ({
dispatch => ({
dispatch,
actions: {
...bindActionCreators({ fetchGlobalProperties }, dispatch),

View File

@ -127,7 +127,7 @@ class EditorScreen extends Component {
};
_handleFormUpdate = (componentID, content) => {
const { handleFormChanged } = this.props;
const { handleFormChanged, isReply } = this.props;
const fields = { ...this.state.fields };
if (componentID === 'body') {
@ -141,7 +141,7 @@ class EditorScreen extends Component {
handleFormChanged();
this._handleIsFormValid();
this._saveCurrentDraft();
if (isReply) this._saveCurrentDraft();
};
_handleOnTagAdded = (tags) => {
@ -149,7 +149,7 @@ class EditorScreen extends Component {
const fields = { ...this.state.fields };
fields.tags = _tags;
this.setState({ fields, isRemoveTag: false, });
this.setState({ fields, isRemoveTag: false });
};
render() {

View File

@ -168,6 +168,13 @@ class LoginScreen extends PureComponent {
</View>
</View>
<View tabLabel="SteemConnect" style={styles.tabbarItem}>
<InformationArea
description={intl.formatMessage({
id: 'login.steemconnect_fee_description',
})}
iconName="ios-information-circle-outline"
bold
/>
<InformationArea
description={intl.formatMessage({
id: 'login.steemconnect_description',

View File

@ -161,20 +161,35 @@ const RootContainer = () => (WrappedComponent) => {
_createPushListener = () => {
const { navigation } = this.props;
let params = null;
let key = null;
let routeName = null;
Push.setListener({
onPushNotificationReceived(pushNotification) {
if (AppState.currentState === 'background') {
if (pushNotification.customProperties.routeName) {
navigation.navigate({
routeName: pushNotification.customProperties.routeName,
});
const extra = JSON.parse(pushNotification.customProperties.extra);
if (extra.parent_permlink || extra.permlink) {
params = {
author:
extra.parent_permlink
? extra.parent_author
: pushNotification.customProperties.target,
permlink: extra.parent_permlink ? extra.parent_permlink : extra.permlink,
};
key = extra.parent_permlink ? extra.parent_permlink : extra.permlink;
routeName = ROUTES.SCREENS.POST;
} else {
navigation.navigate({
routeName: ROUTES.TABBAR.NOTIFICATION,
});
}
params = {
username: pushNotification.customProperties.source,
};
key = pushNotification.customProperties.source;
routeName = ROUTES.SCREENS.PROFILE;
}
setTimeout(() => {
navigation.navigate({ routeName, params, key });
}, 4000);
},
});
};

View File

@ -157,6 +157,7 @@ class SettingsContainer extends Component {
const isPushEnabled = await Push.isEnabled();
await Push.setEnabled(!isPushEnabled);
this._setPushToken();
};
_handleButtonPress = (action, actionType) => {
@ -201,7 +202,7 @@ class SettingsContainer extends Component {
username,
token,
system: Platform.OS,
allows_notify: isNotificationSettingsOpen,
allows_notify: Number(isNotificationSettingsOpen),
};
setPushToken(data);
}