Commit af6a5b95 authored by Martin Santangelo's avatar Martin Santangelo

Merge branch 'release/4.2.1' into fix/nsfw-full-screen-post

parents aa2ef5b0 47613deb
......@@ -83,7 +83,9 @@ class SessionService {
refresh_token_expires * 1000 > Date.now()
) {
logService.info('[SessionService] refreshing token');
return await AuthService.refreshToken();
const token = await AuthService.refreshToken();
await this.loadUser(user);
return token;
}
// ensure user loaded before activate the session
......
......@@ -63,7 +63,7 @@ export default observer(function (props) {
const localStore = useLocalStore(() => ({
height: 42, // input height
onSizeChange(e) {
localStore.height = e.nativeEvent.contentSize.height;
localStore.height = e.nativeEvent.contentSize.height * 1.1;
},
}));
......@@ -111,7 +111,7 @@ export default observer(function (props) {
behavior={Platform.OS === 'ios' ? 'height' : null}>
<ScrollView
keyboardShouldPersistTaps={'handled'}
contentContainerStyle={[styles.scrollBody, styles.bodyContainer]}>
contentContainerStyle={styles.bodyContainer}>
<TopBar
rightText={rightButton}
onPressRight={onPost}
......@@ -203,14 +203,9 @@ export default observer(function (props) {
});
const styles = StyleSheet.create({
scrollBody: {
minHeight: '100%',
},
input: {
minHeight: 100,
flex: 1,
textAlignVertical: 'top',
height: '100%',
},
remindPreview: {
marginHorizontal: 10,
......@@ -241,6 +236,7 @@ const styles = StyleSheet.create({
marginBottom: 0,
},
bodyContainer: {
minHeight: '100%',
paddingBottom: 100,
},
icon: {
......
......@@ -59,13 +59,13 @@ const ActivityFullScreen = observer((props: PropsType) => {
const navigation = useNavigation();
const hasMedia = entity.hasMedia();
const hasRemind = !!entity.remind_object;
const showText = !!entity.text && !store.isEditing;
const overlay = entity.shouldBeBlured() ? (
<ExplicitOverlay
entity={entity}
closeContainerStyle={{ paddingTop: insets.top }}
/>
) : null;
const showText = (!!entity.text || !!entity.title) && !store.isEditing;
const isShortText =
!hasMedia && !hasRemind && entity.text.length < FONT_THRESHOLD;
......
......@@ -149,7 +149,7 @@ export default class Activity extends Component<PropsType, StateType> {
);
}
const hasText = !!entity.text;
const hasText = !!entity.text || !!entity.title;
const lock =
entity.paywall && entity.paywall === '1' ? (
<Lock entity={entity} navigation={this.props.navigation} />
......
......@@ -114,7 +114,6 @@ export default class ActivityEditor extends Component<PropsType, StateType> {
let time_created: string | number = this.state.time_created;
if (time_created) {
time_created = new Date(this.state.time_created).getTime();
time_created = Math.floor(time_created / 1000);
}
return time_created;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment