mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
Conflict
This commit is contained in:
commit
c7331e3812
@ -529,4 +529,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: d4edbb9c1c57c5484f4893520a7865260cb898d3
|
||||
|
||||
COCOAPODS: 1.8.4
|
||||
COCOAPODS: 1.8.3
|
||||
|
@ -51,7 +51,7 @@
|
||||
"react-intl": "^3.3.1",
|
||||
"react-native": "0.61.2",
|
||||
"react-native-actionsheet": "^2.4.2",
|
||||
"react-native-autoheight-webview": "^1.2.2",
|
||||
"react-native-autoheight-webview": "^1.3.4",
|
||||
"react-native-code-push": "esteemapp/react-native-code-push",
|
||||
"react-native-config": "luggit/react-native-config#master",
|
||||
"react-native-dark-mode": "^0.1.2",
|
||||
|
@ -1,17 +1,17 @@
|
||||
export default `
|
||||
const images = document.getElementsByTagName("IMG");
|
||||
var images = document.getElementsByTagName("IMG");
|
||||
for (i = 0; i < images.length; i++) {
|
||||
const result = {
|
||||
var result = {
|
||||
type: 'image',
|
||||
href: images[i].getAttribute("src") || ''
|
||||
}
|
||||
const resultStr = JSON.stringify(JSON.stringify(result)); // workaround
|
||||
const message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
|
||||
var resultStr = JSON.stringify(JSON.stringify(result)); // workaround
|
||||
var message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
|
||||
images[i].setAttribute("onClick", message);
|
||||
}
|
||||
|
||||
document.addEventListener('click', function(event) {
|
||||
let el = event.target;
|
||||
var el = event.target;
|
||||
// A element can be wrapped with inline element. Look parent elements.
|
||||
while (el.tagName !== 'A') {
|
||||
if (!el.parentNode) {
|
||||
@ -23,8 +23,8 @@ document.addEventListener('click', function(event) {
|
||||
return;
|
||||
}
|
||||
if (el.getAttribute('target') === '_external') {
|
||||
const href = el.getAttribute('href');
|
||||
const result = {
|
||||
var href = el.getAttribute('href');
|
||||
var result = {
|
||||
type: '_external',
|
||||
href
|
||||
}
|
||||
@ -33,8 +33,8 @@ document.addEventListener('click', function(event) {
|
||||
return true;
|
||||
}
|
||||
if (el.classList.contains('markdown-external-link')) {
|
||||
const href = el.getAttribute('data-href');
|
||||
const result = {
|
||||
var href = el.getAttribute('data-href');
|
||||
var result = {
|
||||
type: 'markdown-external-link',
|
||||
href
|
||||
}
|
||||
@ -43,8 +43,8 @@ document.addEventListener('click', function(event) {
|
||||
return true;
|
||||
}
|
||||
if (el.classList.contains('markdown-author-link')) {
|
||||
const author = el.getAttribute('data-author');
|
||||
const result = {
|
||||
var author = el.getAttribute('data-author');
|
||||
var result = {
|
||||
type: 'markdown-author-link',
|
||||
author,
|
||||
}
|
||||
@ -53,10 +53,10 @@ document.addEventListener('click', function(event) {
|
||||
}
|
||||
|
||||
if (el.classList.contains('markdown-post-link')) {
|
||||
let category = el.getAttribute('data-tag');
|
||||
let author = el.getAttribute('data-author');
|
||||
let permlink = el.getAttribute('data-permlink');
|
||||
const result = {
|
||||
var category = el.getAttribute('data-tag');
|
||||
var author = el.getAttribute('data-author');
|
||||
var permlink = el.getAttribute('data-permlink');
|
||||
var result = {
|
||||
type: 'markdown-post-link',
|
||||
category,
|
||||
author,
|
||||
@ -66,8 +66,8 @@ document.addEventListener('click', function(event) {
|
||||
return false;
|
||||
}
|
||||
if (el.classList.contains('markdown-tag-link')) {
|
||||
let tag = el.getAttribute('data-tag');
|
||||
const result = {
|
||||
var tag = el.getAttribute('data-tag');
|
||||
var result = {
|
||||
type: 'markdown-tag-link',
|
||||
tag
|
||||
}
|
||||
@ -76,7 +76,7 @@ document.addEventListener('click', function(event) {
|
||||
}
|
||||
if (el.classList.contains('markdown-witnesses-link')) {
|
||||
|
||||
const result = {
|
||||
var result = {
|
||||
type: 'markdown-witnesses-link'
|
||||
}
|
||||
window.ReactNativeWebView.postMessage(JSON.stringify(result));
|
||||
@ -84,8 +84,8 @@ document.addEventListener('click', function(event) {
|
||||
}
|
||||
if (el.classList.contains('markdown-proposal-link')) {
|
||||
|
||||
let proposal = el.getAttribute('data-proposal');
|
||||
const result = {
|
||||
var proposal = el.getAttribute('data-proposal');
|
||||
var result = {
|
||||
type: 'markdown-proposal-link',
|
||||
proposal
|
||||
}
|
||||
@ -93,14 +93,14 @@ document.addEventListener('click', function(event) {
|
||||
return false;
|
||||
}
|
||||
if (el.classList.contains('markdown-video-link')) {
|
||||
const embedSrc = '<iframe frameborder="0" allowfullscreen src="' + el.getAttribute('data-embed-src') + '"></iframe>';
|
||||
var embedSrc = '<iframe frameborder="0" allowfullscreen src="' + el.getAttribute('data-embed-src') + '"></iframe>';
|
||||
if (embedSrc) {
|
||||
el.innerHTML = embedSrc;
|
||||
return;
|
||||
}
|
||||
const videoHref = el.getAttribute('data-video-href');
|
||||
var videoHref = el.getAttribute('data-video-href');
|
||||
if (videoHref) {
|
||||
const result = {
|
||||
var result = {
|
||||
type: 'markdown-video-link',
|
||||
videoHref
|
||||
}
|
||||
@ -109,7 +109,7 @@ document.addEventListener('click', function(event) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const author = el.getAttribute('data-author').toString();
|
||||
var author = el.getAttribute('data-author').toString();
|
||||
window.ReactNativeWebView.postMessage(JSON.stringify(author));
|
||||
})
|
||||
true;`;
|
||||
|
@ -209,8 +209,6 @@ const PostBody = ({
|
||||
}
|
||||
body {
|
||||
color: ${EStyleSheet.value('$primaryBlack')};
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
a {
|
||||
color: ${EStyleSheet.value('$primaryBlue')};
|
||||
|
@ -46,11 +46,9 @@ const PostsView = ({
|
||||
const [startPermlink, setStartPermlink] = useState('');
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isShowFilterBar, setIsShowFilterBar] = useState(true);
|
||||
const [selectedFilterIndex, setSelectedFilterIndex] = useState(selectedOptionIndex || 0);
|
||||
const [isNoPost, setIsNoPost] = useState(false);
|
||||
const [promotedPosts, setPromotedPosts] = useState([]);
|
||||
const [scrollOffsetY, setScrollOffsetY] = useState(0);
|
||||
const [selectedFilterValue, setSelectedFilterValue] = useState(
|
||||
filterOptionsValue && filterOptionsValue[selectedFilterIndex],
|
||||
);
|
||||
@ -333,22 +331,17 @@ const PostsView = ({
|
||||
);
|
||||
};
|
||||
|
||||
const _handleOnScroll = event => {
|
||||
const currentOffset = event.nativeEvent.contentOffset.y;
|
||||
|
||||
const _handleOnScroll = () => {
|
||||
if (handleOnScroll) {
|
||||
handleOnScroll();
|
||||
}
|
||||
|
||||
setScrollOffsetY(currentOffset);
|
||||
setIsShowFilterBar(scrollOffsetY > currentOffset || scrollOffsetY <= 0);
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeContainer>
|
||||
{({ isDarkTheme }) => (
|
||||
<View style={styles.container}>
|
||||
{filterOptions && isShowFilterBar && (
|
||||
{filterOptions && (
|
||||
<FilterBar
|
||||
dropdownIconName="arrow-drop-down"
|
||||
//options={filterOptions}
|
||||
|
@ -464,7 +464,7 @@ export const getSettings = async () => {
|
||||
}
|
||||
const settingData = {
|
||||
language: '',
|
||||
isDarkTheme: false,
|
||||
isDarkTheme: null,
|
||||
currency: '',
|
||||
notification: true,
|
||||
server: '',
|
||||
|
@ -461,7 +461,11 @@ class ApplicationContainer extends Component {
|
||||
const settings = await getSettings();
|
||||
|
||||
if (settings) {
|
||||
dispatch(isDarkTheme(nativeThemeInitialMode === 'dark' || settings.isDarkTheme));
|
||||
dispatch(
|
||||
isDarkTheme(
|
||||
settings.isDarkTheme === null ? nativeThemeInitialMode === 'dark' : settings.isDarkTheme,
|
||||
),
|
||||
);
|
||||
this.setState({ isThemeReady: true });
|
||||
if (settings.isPinCodeOpen !== '') dispatch(isPinCodeOpen(settings.isPinCodeOpen));
|
||||
if (settings.language !== '') dispatch(setLanguage(settings.language));
|
||||
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
||||
import { createAppContainer } from 'react-navigation';
|
||||
|
||||
import AppNavitation from '../../../navigation/routes';
|
||||
import { setTopLevelNavigator } from '../../../navigation/service';
|
||||
import { setTopLevelNavigator, navigate } from '../../../navigation/service';
|
||||
|
||||
// Services
|
||||
import { toastNotification as toastNotificationAction } from '../../../redux/actions/uiAction';
|
||||
|
Loading…
Reference in New Issue
Block a user