This commit is contained in:
LubuWest 2018-10-01 21:17:54 +02:00
commit 09e8b8d097
49 changed files with 1720 additions and 825 deletions

View file

@ -40,7 +40,10 @@ function requestFriends(login,database,rootwindow,callback){
var result = tx.executeSql('UPDATE contacts SET isFriend=0 where username="'+login.username+'"')}); // clean old friends
Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
var friends=JSON.parse(obj);
for (var i=0;i<friends.length;i++){ friends[i].isFriend=1}
for (var i=0;i<friends.length;i++){
friends[i].created_at=Date.parse(cleanDate(friends[i].created_at));
friends[i].isFriend=1
}
//try{requestProfile(login,friends,rootwindow,function(friends_profile){callback(friends_profile)})}
//catch(e){
callback(friends)//}

View file

@ -29,6 +29,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
function findend (text, startpos) {
var indexOf = text.substring(startpos || 0).search(/\s/);
return (indexOf >= 0) ? (indexOf + (startpos || 0)) : indexOf;
}
WorkerScript.onMessage = function(msg) {
if(msg.deleteId!==undefined)
{msg.model.remove(msg.deleteId);
@ -97,8 +103,10 @@ else{
}
else {attachhelper.url=attachArray[image].url}
attachmentList.push(attachhelper)
//print("Attachhelper "+attachhelper.url)
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url,"")
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","")
newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"")
}
}
}catch(e){print("attachment "+e)}
@ -114,6 +122,20 @@ else{
}
}
}
if (newsitemobject.text.indexOf("/videos/watch/")>-1){
var ptvideohelper={mimetype:"video/mp4"}
var ptvideotext=newsitemobject.text;
while (ptvideotext.indexOf("/videos/watch/")>-1){
var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/");
var ptposend=findend(ptvideotext,ptvideohelperstringposition);
if(ptposend==-1){ptposend=ptvideotext.length};
ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4";
ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed");
ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)}
}
}
newsitemobject.attachmentList=attachmentList;
var seconds=(msg.currentTime-newsitemobject.created_at)/1000;

View file

@ -394,7 +394,7 @@ function processNews(api,data){
newslist[n].statusnet_html=newslist[n].msg_html;
newslist[n].text=newslist[n].msg;
}
} else {
} else {//if(api!="/api/statuses/user_timeline"){
var chatlist=[];
var conversationIds=[];
var commentCount=[];
@ -458,6 +458,9 @@ function processNews(api,data){
newslist.reverse();
newstab.conversation=newslist
}
else if (api=="/api/statuses/user_timeline"){
newstab.contactposts=newslist
}
else if (newstab.newstabstatus==="Conversations"){
showNews(chatlist);root.news=newslist}
else {showNews(newslist);root.news=newslist};

View file

@ -30,6 +30,53 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
var html=[//Smileys
'\u263A',
'\u2639',
'\u263B',
//Weather
'\u2600',
'\u2601',
'\u263C',
'\u2614',
'\u2602',
'\u2603',
'\u2604',
'\u26C4',
'\u26C5',
'\u26C8',
//Leisure
'\u2615',
'\u26BD',
'\u26BE',
'\u26F1',
'\u26F2',
'\u26F3',
'\u26F4',
'\u26F5',
'\u26F7',
'\u26F8',
'\u26F9',
'\u26FA',
'\u26FD',
//Hand
'\u261C',
'\u261D',
'\u261E',
'\u261F',
'\u2620',
'\u2622',
'\u2623',
//Religion
'\u2626',
'\u262A',
'\u262C',
'\u262E',
'\u262F',
'\u26EA',
'\u26E9'
]
var core=[
{name:'&lt;3',url:
'qrc:///images/smileys/core/smiley-heart.gif'},