mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 22:03:21 +03:00
commit
1bac506cee
@ -1,4 +1,13 @@
|
||||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
sourceMaps: true,
|
||||
module.exports = (api) => {
|
||||
const babelEnv = api.env();
|
||||
const plugins = [];
|
||||
//change to 'production' to check if this is working in 'development' mode
|
||||
if (babelEnv !== 'development') {
|
||||
plugins.push(['transform-remove-console', { exclude: ['error', 'warn'] }]);
|
||||
}
|
||||
return {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
sourceMaps: true,
|
||||
plugins,
|
||||
};
|
||||
};
|
||||
|
@ -43,7 +43,7 @@
|
||||
05B6C4B024C306CE00B7FA60 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 980BC9BC0D3B4AC69645C842 /* Zocial.ttf */; };
|
||||
0A1D279E0D3CD306C889592E /* libPods-Ecency-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7093E51BBC0EE2F41AB19EBA /* libPods-Ecency-tvOS.a */; };
|
||||
1CD0B89E258019B600A7D78E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1CD0B89B258019B600A7D78E /* GoogleService-Info.plist */; };
|
||||
2B3CF3607B7CB9B7296FD5EF /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
|
||||
2B3CF3607B7CB9B7296FD5EF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
|
||||
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
@ -55,7 +55,7 @@
|
||||
CFAA2A599FD65F360D9B3E1E /* libPods-EcencyTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B344CAA24725C973F48BE81E /* libPods-EcencyTests.a */; };
|
||||
D71EB20EDB9B987C0574BAFE /* libPods-EcencyTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C97456BE898C00B5EDA21C2E /* libPods-EcencyTests.a */; };
|
||||
DC0E25610BB5F49AFF4514AD /* libPods-Ecency.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 388DF3FF85F08109F722083B /* libPods-Ecency.a */; };
|
||||
F77F6C7E54F3C783A2773E9D /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
|
||||
F77F6C7E54F3C783A2773E9D /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -204,8 +204,8 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
05B6C49424C306CE00B7FA60 /* StoreKit.framework in Frameworks */,
|
||||
F77F6C7E54F3C783A2773E9D /* BuildFile in Frameworks */,
|
||||
2B3CF3607B7CB9B7296FD5EF /* BuildFile in Frameworks */,
|
||||
F77F6C7E54F3C783A2773E9D /* (null) in Frameworks */,
|
||||
2B3CF3607B7CB9B7296FD5EF /* (null) in Frameworks */,
|
||||
DC0E25610BB5F49AFF4514AD /* libPods-Ecency.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -1071,7 +1071,7 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.esteem.mobile.ios.eshare;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = ios_dev_group;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "extension-dev";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@ -1090,7 +1090,7 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = eshare/eshare.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@ -1103,7 +1103,7 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.esteem.mobile.ios.eshare;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "extension-dist";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "extension-dev";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@ -1196,7 +1196,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Ecency/Ecency.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 2794;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
@ -1255,7 +1255,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.esteem.mobile.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = ios_dist_app;
|
||||
PROVISIONING_PROFILE_SPECIFIER = ios_dev_app;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Ecency-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
|
@ -118,5 +118,7 @@
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -109,7 +109,7 @@ const PostsContainer = ({
|
||||
};
|
||||
|
||||
const _scheduleLatestPostsCheck = (firstPost) => {
|
||||
const refetchTime = __DEV__ ? 5000 : 600000;
|
||||
const refetchTime = __DEV__ ? 50000 : 600000;
|
||||
if (_postFetchTimer) {
|
||||
clearTimeout(_postFetchTimer);
|
||||
}
|
||||
@ -168,14 +168,14 @@ const PostsContainer = ({
|
||||
};
|
||||
|
||||
const cacheReducer = (state, action) => {
|
||||
console.log('reducer action:', state, action);
|
||||
console.log('reducer action:', action);
|
||||
|
||||
switch (action.type) {
|
||||
case 'is-filter-loading': {
|
||||
const filter = action.payload.filter;
|
||||
const loading = action.payload.isLoading;
|
||||
state.cachedData[filter].isLoading = loading;
|
||||
console.log('New state:', state);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -215,7 +215,6 @@ const PostsContainer = ({
|
||||
cachedEntry.posts = _posts;
|
||||
|
||||
state.cachedData[filter] = cachedEntry;
|
||||
console.log('New state:', state);
|
||||
|
||||
//dispatch to redux
|
||||
if (
|
||||
@ -237,7 +236,6 @@ const PostsContainer = ({
|
||||
cachedEntry.posts = [];
|
||||
|
||||
state.cachedData[filter] = cachedEntry;
|
||||
console.log('New state:', state);
|
||||
|
||||
//dispatch to redux
|
||||
_setFeedPosts([]);
|
||||
@ -248,7 +246,6 @@ const PostsContainer = ({
|
||||
case 'change-filter': {
|
||||
const filter = action.payload.currentFilter;
|
||||
state.currentFilter = filter;
|
||||
console.log('New state:', state);
|
||||
|
||||
const data = state.cachedData[filter !== 'feed' ? filter : state.currentSubFilter];
|
||||
_setFeedPosts(data.posts, data.scrollPosition);
|
||||
@ -264,7 +261,7 @@ const PostsContainer = ({
|
||||
case 'change-sub-filter': {
|
||||
const filter = action.payload.currentSubFilter;
|
||||
state.currentSubFilter = filter;
|
||||
console.log('New state:', state);
|
||||
|
||||
//dispatch to redux;
|
||||
const data = state.cachedData[filter];
|
||||
_setFeedPosts(data.posts, data.scrollPosition);
|
||||
|
@ -101,7 +101,7 @@ class TransferContainer extends Component {
|
||||
}
|
||||
if (transferType === 'address_view' && fundType === 'BTC') {
|
||||
//TODO implement transfer of custom tokens
|
||||
// console.log(tokenAddress);
|
||||
console.log(tokenAddress);
|
||||
}
|
||||
|
||||
const local = await getUserDataWithUsername(username);
|
||||
|
@ -501,7 +501,7 @@ export const getSettings = async () => {
|
||||
notification: true,
|
||||
server: '',
|
||||
upvotePercent: '1',
|
||||
nsfw: '0',
|
||||
nsfw: '1',
|
||||
followNotification: true,
|
||||
voteNotification: true,
|
||||
commentNotification: true,
|
||||
@ -668,8 +668,8 @@ export const getStorageType = async () => {
|
||||
export const getVersionForWelcomeModal = async () => {
|
||||
try {
|
||||
const application = await getItemFromStorage(APPLICATION_SCHEMA);
|
||||
if (application.versionForWelcomeModal) {
|
||||
return parseFloat(application.versionForWelcomeModal);
|
||||
if (application && application.versionForWelcomeModal) {
|
||||
return parseFloat(application.versionForWelcomeModal) || 0;
|
||||
}
|
||||
return 0;
|
||||
} catch (error) {
|
||||
|
@ -57,7 +57,7 @@ const initialState = {
|
||||
voteNotification: true,
|
||||
},
|
||||
upvotePercent: 1,
|
||||
nsfw: 'Always show',
|
||||
nsfw: '1',
|
||||
pin: null,
|
||||
isPinCodeOpen: true,
|
||||
isRenderRequired: false,
|
||||
|
@ -164,7 +164,7 @@ class EditorContainer extends Component {
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// console.log(error, error.message);
|
||||
console.log(error, error.message);
|
||||
if (error.toString().includes('code 413')) {
|
||||
Alert.alert(
|
||||
intl.formatMessage({
|
||||
|
@ -47,8 +47,6 @@ export const parsePost = (post, currentUserName, isPromoted, isList = false) =>
|
||||
post.avatar = getResizedAvatar(get(post, 'author'));
|
||||
if (!isList) {
|
||||
post.body = renderPostBody(post, true, webp);
|
||||
} else {
|
||||
post.body = '';
|
||||
}
|
||||
post.summary = postBodySummary(post, 150);
|
||||
post.is_declined_payout = parseAsset(post.max_accepted_payout).amount === 0;
|
||||
@ -63,6 +61,11 @@ export const parsePost = (post, currentUserName, isPromoted, isList = false) =>
|
||||
//stamp posts with fetched time;
|
||||
post.post_fetched_at = new Date().getTime();
|
||||
|
||||
//discard post body if list
|
||||
if (isList) {
|
||||
post.body = '';
|
||||
}
|
||||
|
||||
//cache image
|
||||
if (post.image) {
|
||||
FastImage.preload([{ uri: post.image }]);
|
||||
|
Loading…
Reference in New Issue
Block a user