...
 
Commits (15)
......@@ -202,8 +202,8 @@ workflows:
filters:
branches:
only:
- /^stable-*/
- /^test-*/
- /^stable.*/
- /^test.*/
- test/circle-ci
- sentry:
requires:
......
......@@ -98,8 +98,7 @@ sessionService.onLogin(async () => {
NavigationService.navigate(sessionService.initialScreen);
// check onboarding progress and navigate if necessary
// commenting this to prevent that the app navigates to onboarding after login
stores.onboarding.getProgress();
stores.onboarding.getProgress(sessionService.initialScreen !== 'OnboardingScreenNew');
// check update
if (Platform.OS !== 'ios' && !GOOGLE_PLAY_STORE) {
......
......@@ -7,7 +7,7 @@ import { MINDS_FEATURES } from '../../../src/config/Config';
describe('Feature service', () => {
it('should return features', async () => {
let features = {"crypto": false}
let features = { crypto: false, 'onboarding-december-2019': true };
expect(service.features).toEqual(features);
expect(service.has('crypto')).toEqual(false);
});
......
......@@ -26,10 +26,10 @@ org.gradle.jvmargs=-Xmx2048m
systemProp.org.gradle.internal.http.connectionTimeout=180000
systemProp.org.gradle.internal.http.socketTimeout=180000
versionName=3.15.0
versionName=3.15.1
# CUSTOM
versionCode=1050000019
versionCode=1050000020
# PLAY STORE (Keep double hash for the CI)
## versionCode=310038
## versionCode=310039
import deleteUser from './helpers/deleteUser';
import sleep from '../src/common/helpers/sleep';
describe('Register Flow', () => {
describe.skip('Register Flow', () => {
const username = 'e2euser' + ((Math.random() * 0xffffff) << 0).toString(16);
const password = process.env.loginPass;
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.15.0</string>
<string>3.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.15.0</string>
<string>3.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.15.0</string>
<string>3.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.15.0</string>
<string>3.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -17,7 +17,8 @@
"error":"SORRY, WE COULDN'T LOAD THE ACTIVITY",
"tryAgain":"PLEASE TRY AGAIN LATER",
"remindBlocked":"This remind is not available because you blocked",
"scheduled":"This activity is scheduled to be shown on"
"scheduled":"This activity is scheduled to be shown on",
"pendingModeration":"This post is awaiting moderation"
},
"permissions": {
"externalStorage":"Minds needs access to your external storage so you can upload awesome pictures.",
......
{
"versions": [
{
"version": "3.15.1",
"href": "https://cdn-assets.minds.com/mobile/Minds-stable-3-15-1.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.15.1",
"changelog": [
"New Onboarding",
"Bug fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "cb074faeca700b836655ad0fd0d854bb"
},
{
"type": "sha256",
"value": "97e0f6721abce3fbff40ec78b6d833b08aa8e20e88ee800d286010348a61e363"
},
{
"type": "sha512",
"value": "1e2dd0fccf7b9c375e84a5ea75c040c691f34175271a644d982de3fc7d1831c9fe1ce641f1f73367959ae0ebe4da9a67d52cdf7a91cd9a5a18547cea0c131fc2"
}
]
},
{
"version": "3.15.0",
"href": "https://cdn-assets.minds.com/mobile/Minds-stable-3-15-0.apk",
"sourceHref": "https://gitlab.com/minds/mobile-native/commits/v3.15.0",
"changelog": [
"New login and register screens",
"Bug fixes"
],
"unstable": false,
"hashes": [
{
"type": "md5",
"value": "0b41d23037645b7f3eb033c1f617da6a"
},
{
"type": "sha256",
"value": "f069afcaef9527921fff54194734b62da77756610228a7590a98e29d6f159462"
},
{
"type": "sha512",
"value": "0e6606c99855e173ddc1e62d716684a920e7cec4433bdce8495e0216fa3c0e61cb5ff1abd9dd5cb265764f81bfb6518a37764a645f02350083cc44cb19c60f43"
}
]
},
{
"version": "3.14.0",
"timestamp": 1576783681,
......
......@@ -191,9 +191,11 @@ class CommentList extends React.Component<PropsType, StateType> {
*/
scrollToBottom = () => {
setTimeout(() => {
this.listRef.scrollToEnd();
}, 250); //delay to allow rendering
}
if (this.listRef) {
this.listRef.scrollToEnd();
}
}, 600); //delay to allow rendering
};
/**
* Set comment text
......
......@@ -359,6 +359,13 @@ export default class BaseModel {
return this.time_created * 1000 > Date.now();
}
/**
* Check if awaiting for moderation
*/
isPending() {
return this.pending && this.pending !== '0'; // asking like this because front does the same
}
static isScheduled(timeCreatedValue) {
let response = false;
......
......@@ -39,6 +39,7 @@ export const CODE_PUSH_TOKEN = '';
*/
export const MINDS_FEATURES = {
crypto: Platform.OS === 'ios' ? false : true,
'onboarding-december-2019': true,
};
/**
......
......@@ -133,20 +133,65 @@ export default class Activity extends Component {
{ overlay }
</View>
{ this.showActions() }
{ this.props.entity.isScheduled() &&
<View style={[{backgroundColor: '#ffecb3'}, CommonStyle.padding]}>
<Text style={[styles.scheduledText, CommonStyle.paddingLeft]}>
{`${i18n.t('activity.scheduled')} ${formatDate(this.props.entity.time_created)}.`}
</Text>
</View> }
{ this.props.isLast ? <View style={styles.activitySpacer}></View> : null}
{ !this.props.hideTabs &&
!this.props.entity.isScheduled() &&
<ActivityMetrics entity={this.props.entity}/> }
{ this.renderScheduledMessage() }
{ this.renderPendingMessage() }
{ this.renderActivitySpacer() }
{ this.renderActivityMetrics() }
</View>
);
}
/**
* Render activity spacer
*/
renderActivitySpacer = () => {
return this.props.isLast
? (<View style={styles.activitySpacer}></View>)
: null;
};
/**
* Render entity metrics
*/
renderActivityMetrics = () => {
return (
!this.props.hideTabs &&
!this.props.entity.isScheduled() &&
!this.props.entity.isPending()
) ? (<ActivityMetrics entity={this.props.entity}/>) : null
};
/**
* Show message if entity is scheduled
*/
renderScheduledMessage = () => {
return this.props.entity.isScheduled()
? (this.renderYellowBanner(`${i18n.t('activity.scheduled')} ${formatDate(this.props.entity.time_created)}.`))
: null;
};
/**
* Show message if entity is awaiting moderation
*/
renderPendingMessage = () => {
return this.props.entity.isPending()
? (this.renderYellowBanner(i18n.t('activity.pendingModeration')))
: null;
};
/**
* Render a banner with a message bellow the activity
*/
renderYellowBanner = message => {
return (
<View style={[styles.yellowBanner, CommonStyle.padding]}>
<Text style={[styles.yellowBannerText, CommonStyle.paddingLeft]}>
{message}
</Text>
</View>
);
};
/**
* Pause video if exist
*/
......@@ -348,8 +393,11 @@ const styles = StyleSheet.create({
blockedNoticeDesc: {
opacity: 0.7,
},
scheduledText: {
yellowBannerText: {
fontSize: 11,
color: '#000',
},
yellowBanner: {
backgroundColor: '#ffecb3',
}
});
......@@ -34,9 +34,10 @@ import HashtagsStepNew from './steps/HashtagsStepNew';
import ChannelSetupStepNew from './steps/ChannelSetupStepNew';
import SuggestedGroupsStepNew from './steps/SuggestedGroupsStepNew';
@observer
export default
@inject('onboarding', 'hashtag', 'groupsBar', 'discovery')
export default class OnboardingScreenNew extends Component {
@observer
class OnboardingScreenNew extends Component {
/**
* Disable navigation bar
......@@ -124,13 +125,14 @@ export default class OnboardingScreenNew extends Component {
steps.push({component: <ChannelSetupStepNew ref={r => this.channelSetup = r} onNext={this.onNext} onBack={this.onBack}/> });
}
if (!completed_items.some(r => r == 'suggested_groups')) {
steps.push({component: <SuggestedGroupsStepNew onNext={this.onNext} onBack={this.onBack}/>});
}
// TODO: enable group and channel selectors
// if (!completed_items.some(r => r == 'suggested_groups')) {
// steps.push({component: <SuggestedGroupsStepNew onNext={this.onNext} onBack={this.onBack}/>});
// }
if (!completed_items.some(r => r == 'suggested_channels')) {
steps.push({component: <SuggestedChannelsStepNew onNext={this.onNext} onBack={this.onBack}/>});
}
// if (!completed_items.some(r => r == 'suggested_channels')) {
// steps.push({component: <SuggestedChannelsStepNew onNext={this.onNext} onBack={this.onBack}/>});
// }
return (
<SafeAreaView style={[CS.flexContainer, CS.backgroundPrimary]}>
......
......@@ -39,13 +39,13 @@ class OnboardingStore {
/**
* Get progress
*/
async getProgress() {
async getProgress(navigate = true) {
logService.info('[OnboardingStore] getting onboarding progress');
let onboarding = featuresService.has('onboarding-december-2019') ? 'OnboardingScreenNew' : 'OnboardingScreen';
try {
const progress = await onboardingService.getProgress();
this.setProgress(progress);
if (progress && progress.show_onboarding) {
if (progress && progress.show_onboarding && navigate) {
NavigationService.push(onboarding);
}
return progress;
......
......@@ -22,6 +22,12 @@ class ShareService {
* @param {string} url
*/
share(title, url) {
// added this because if tittle (activity text) is too long, causes problem in android
title = title.length > 50
? title.substring(0, 46) + '...'
: title;
// added a settimeout as a workaround for ios, without it the share dialog is not shown
setTimeout(async () => {
try {
......