Don't include the / mark unless there are additional mentions resolves #46

This commit is contained in:
Morgan McMillian 2018-01-18 21:36:24 -08:00
parent 576f8ed493
commit 5a016ea197
2 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.monkeystew.goober-m" version="0.4.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.monkeystew.goober-m" version="0.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Goober</name>
<description>Goober, a mobile app for pnut.io</description>
<author email="gilag@monkeystew.com" href="https://monkeystew.org">Morgan McMillian</author>
@ -84,14 +84,14 @@
<icon height="110" src="resources/icon-110.png" width="110" />
<icon height="144" src="resources/icon-144.png" width="144" />
</platform>
<allow-navigation href="http://10.0.0.212:8100" />
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-console" spec="^1.0.5" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-share-content" spec="^1.0.0" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-share-content" spec="^1.0.0" />
<allow-navigation href="http://169.254.225.150:8100" />
</widget>

View file

@ -406,9 +406,6 @@ export class NewPostModal {
parseMentions(mentions) {
let mtext = ""
if (this.navParams.data.cc) {
mtext += "\n/";
}
for(var i = 0; i < mentions.length; i++) {
let mu = mentions[i].text;
if (mu !== this.myUsername) {
@ -416,6 +413,9 @@ export class NewPostModal {
}
}
if (mtext.length > 0) {
if (this.navParams.data.cc) {
mtext = "\n/" + mtext;
}
return mtext;
} else {
return "";