Androidkram

This commit is contained in:
Flummi 2020-01-21 19:08:40 +01:00
parent def4c4af8a
commit 5a8dd96b83
4 changed files with 81 additions and 46 deletions

View File

@ -96001,7 +96001,6 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
horizontal = _ref2.horizontal,
tintColor = _ref2.tintColor;
var routeName = navigation.state.routeName;
var IconComponent = _Ionicons.default;
var iconName;
switch (routeName) {
@ -96022,13 +96021,13 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
break;
}
return _react.default.createElement(IconComponent, {
return _react.default.createElement(_Ionicons.default, {
name: iconName,
size: 25,
color: tintColor,
__source: {
fileName: _jsxFileName,
lineNumber: 49
lineNumber: 48
}
});
}
@ -96052,7 +96051,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
return _react.default.createElement(AppContainer, {
__source: {
fileName: _jsxFileName,
lineNumber: 57
lineNumber: 56
}
});
}
@ -119053,19 +119052,61 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(HomeScreen)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.state = {
dataSource: [],
debug: "deeeebug"
columns: 1,
debug: "0.00px"
};
_this.handleScroll = function (e) {
var el = e.nativeEvent;
return;
_this.setState({
debug: el.contentOffset.y.toFixed(2) + "px"
});
};
_this.handleLayout = function (e) {
console.log(e.nativeEvent.layout);
_this.handleLayout = function _callee(e) {
var h, w, columns, rows, eps, res, items;
return _regenerator.default.async(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
console.log(e.nativeEvent.layout);
h = e.nativeEvent.layout.height;
w = e.nativeEvent.layout.width;
columns = ~~(w / 128);
rows = ~~(h / 128);
eps = 200;
_context.t0 = _regenerator.default;
_context.next = 9;
return _regenerator.default.awrap(fetch("https://dev.f0ck.me/api/p?eps=" + eps));
case 9:
_context.t1 = _context.sent.json();
_context.next = 12;
return _context.t0.awrap.call(_context.t0, _context.t1);
case 12:
res = _context.sent;
items = res.items.map(function (e) {
return {
id: e.id,
src: "https://f0ck.me/t/" + e.id + ".png"
};
});
_this.setState({
dataSource: items,
columns: columns,
debug: "c: " + columns + " r: " + rows + " eps: " + eps
});
case 15:
case "end":
return _context.stop();
}
}
});
};
return _this;
@ -119074,38 +119115,15 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
(0, _createClass2.default)(HomeScreen, [{
key: "componentDidMount",
value: function componentDidMount() {
var res, items;
return _regenerator.default.async(function componentDidMount$(_context) {
return _regenerator.default.async(function componentDidMount$(_context2) {
while (1) {
switch (_context.prev = _context.next) {
switch (_context2.prev = _context2.next) {
case 0:
_context.t0 = _regenerator.default;
_context.next = 3;
return _regenerator.default.awrap(fetch("https://dev.f0ck.me/api/p?eps=54"));
case 3:
_context.t1 = _context.sent.json();
_context.next = 6;
return _context.t0.awrap.call(_context.t0, _context.t1);
case 6:
res = _context.sent;
items = res.items.map(function (e) {
return {
id: e.id,
src: "https://f0ck.me/t/" + e.id + ".png"
};
});
this.setState({
dataSource: items
});
case 9:
case "end":
return _context.stop();
return _context2.stop();
}
}
}, null, this);
});
}
}, {
key: "render",
@ -119117,7 +119135,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
},
__source: {
fileName: _jsxFileName,
lineNumber: 36
lineNumber: 57
}
}, _react.default.createElement(_reactNative.Image, {
source: {
@ -119126,11 +119144,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
style: {
width: 112,
height: 28,
marginTop: 16
marginTop: 8
},
__source: {
fileName: _jsxFileName,
lineNumber: 37
lineNumber: 58
}
}), _react.default.createElement(_reactNative.Text, {
style: {
@ -119140,7 +119158,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
},
__source: {
fileName: _jsxFileName,
lineNumber: 38
lineNumber: 59
}
}, this.state.debug), _react.default.createElement(_reactNative.FlatList, {
data: this.state.dataSource,
@ -119152,11 +119170,11 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
style: {
flex: 1,
flexDirection: "column",
margin: 1
margin: 5
},
__source: {
fileName: _jsxFileName,
lineNumber: 45
lineNumber: 66
}
}, _react.default.createElement(_reactNative.TouchableOpacity, {
key: item.id,
@ -119165,7 +119183,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
},
__source: {
fileName: _jsxFileName,
lineNumber: 46
lineNumber: 67
}
}, _react.default.createElement(_reactNative.Image, {
style: {
@ -119177,17 +119195,18 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
},
__source: {
fileName: _jsxFileName,
lineNumber: 47
lineNumber: 68
}
})));
},
numColumns: 4,
key: this.state.columns,
numColumns: this.state.columns,
keyExtractor: function keyExtractor(item, index) {
return index.toString();
},
__source: {
fileName: _jsxFileName,
lineNumber: 40
lineNumber: 61
}
}));
}

File diff suppressed because one or more lines are too long

View File

@ -149,6 +149,14 @@ android {
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
debug {
@ -157,7 +165,8 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
//signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}

View File

@ -19,3 +19,10 @@
android.useAndroidX=true
android.enableJetifier=true
#YTBrrKBSbP37RYqX
MYAPP_UPLOAD_STORE_FILE=f0ckapp.keystore
MYAPP_UPLOAD_KEY_ALIAS=f0ckapp
MYAPP_UPLOAD_STORE_PASSWORD=YTBrrKBSbP37RYqX
MYAPP_UPLOAD_KEY_PASSWORD=YTBrrKBSbP37RYqX