summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-04-08 23:05:29 +0200
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 23:17:31 +0200
commitb0b08326a8c624a8b8180362c78b52fb23eb583e (patch)
tree2d9f268d24d3326032fcac8d4a120fd3976665dc /js
parentacd944a6ef5af09d523a8638009ca10d0a7a8e37 (diff)
🩹 Fix rebase issues
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'js')
-rw-r--r--js/controller/ContentController.js5
-rw-r--r--js/controller/ShareController.js19
2 files changed, 8 insertions, 16 deletions
diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js
index ab01bf0cd..942618a9c 100644
--- a/js/controller/ContentController.js
+++ b/js/controller/ContentController.js
@@ -8,8 +8,7 @@
* @copyright Bernhard Posselt 2014
*/
app.controller('ContentController', function (Publisher, FeedResource, ItemResource, SettingsResource, data, $route,
- $routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading,
- $filter) {
+ $routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) {
'use strict';
this.showDropdown = [];
@@ -102,8 +101,8 @@ app.controller('ContentController', function (Publisher, FeedResource, ItemResou
this.toggleKeepUnread = function (itemId) {
var item = ItemResource.get(itemId);
if (!item.unread) {
- ItemResource.markItemRead(itemId, false);
FeedResource.markItemOfFeedUnread(item.feedId);
+ ItemResource.markItemRead(itemId, false);
}
item.keepUnread = !item.keepUnread;
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js
index 0edab4a27..8df57c5d0 100644
--- a/js/controller/ShareController.js
+++ b/js/controller/ShareController.js
@@ -21,11 +21,6 @@ app.controller('ShareController', function (ShareResource, Loading) {
/** True if the most recent request failed */
this.searchUsersFailed = false;
- /** */
- this.facebookLimit = 180;
- this.twitterLimit = 100;
- this.emailLimit = 180;
-
/**
* @param search Username search query
*
@@ -178,17 +173,15 @@ app.controller('ShareController', function (ShareResource, Loading) {
return media.some(m => this.isSocialAppEnabled(m));
};
- this.getFacebookUrl = function(url, intro){
- return `https://www.facebook.com/sharer/sharer.php?u=${url}&quote=${intro.substring(0,this.facebookLimit)}`+
- `...`;
+ this.getFacebookUrl = function(url){
+ return 'https://www.facebook.com/sharer/sharer.php?u='+url;
};
- this.getTwitterUrl = function(url, intro){
- return `https://twitter.com/intent/tweet?url=${url}&text=${intro.substring(0,this.twitterLimit)}`+
- `...`;
+ this.getTwitterUrl = function(url){
+ return 'https://twitter.com/intent/tweet?url='+url;
};
- this.getEmailUrl = function(url, object, intro){
- return encodeURI(`mailto:?subject=${object}&body=${intro.substring(0,this.emailLimit)}...\n\n${url}`);
+ this.getEmailUrl = function(url, object, body){
+ return encodeURI('mailto:?subject=' + object + '&body=' + body + ' ' + url);
};
});