design change fix

This commit is contained in:
Hannes Mannerheim 2015-06-07 11:48:41 +02:00
parent 3d7113bf62
commit b292a273d8
2 changed files with 10 additions and 12 deletions

View File

@ -110,9 +110,6 @@ class QvitterAction extends ApiAction
<title><?php print $sitetitle; ?></title> <title><?php print $sitetitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<style>
</style>
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?changed=<?php print date('YmdHis',filemtime(QVITTERDIR.'/css/qvitter.css')); ?>" /> <link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/qvitter.css?changed=<?php print date('YmdHis',filemtime(QVITTERDIR.'/css/qvitter.css')); ?>" />
<link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" /> <link rel="stylesheet" type="text/css" href="<?php print $qvitterpath; ?>css/jquery.minicolors.css" />
<link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?><?php print QvitterPlugin::settings("favicon"); ?>"> <link rel="shortcut icon" type="image/x-icon" href="<?php print $qvitterpath; ?><?php print QvitterPlugin::settings("favicon"); ?>">

View File

@ -577,8 +577,7 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) {
} }
else { else {
var h2FeedHeader = streamHeader; var h2FeedHeader = streamHeader;
} }
// if we have a saved copy of this stream, show it immediately (but it is replaced when stream finishes to load later) // if we have a saved copy of this stream, show it immediately (but it is replaced when stream finishes to load later)
if(typeof window.oldStreams[window.currentStream] != "undefined") { if(typeof window.oldStreams[window.currentStream] != "undefined") {
@ -594,11 +593,7 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) {
// also mark this stream as the current stream immediately, if a saved copy exists // also mark this stream as the current stream immediately, if a saved copy exists
addStreamToHistoryMenuAndMarkAsCurrent(streamHeader, defaultStreamName); addStreamToHistoryMenuAndMarkAsCurrent(streamHeader, defaultStreamName);
// and change design immediately
changeDesign(window.oldStreamsDesigns[theUserOrGroupThisStreamBelongsTo(window.currentStream)]);
} }
// otherwise we fade out and wait for stream to load // otherwise we fade out and wait for stream to load
else { else {
// fade out // fade out
@ -608,6 +603,15 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) {
$('#feed-header-inner h2').html(h2FeedHeader); $('#feed-header-inner h2').html(h2FeedHeader);
}); });
} }
// change design immediately to either cached design or logged in user's
if(typeof window.oldStreamsDesigns[theUserOrGroupThisStreamBelongsTo(window.currentStream)] != 'undefined') {
changeDesign(window.oldStreamsDesigns[theUserOrGroupThisStreamBelongsTo(window.currentStream)]);
}
else {
changeDesign({backgroundimage:window.loggedIn.background_image, backgroundcolor:window.loggedIn.backgroundcolor, linkcolor:window.loggedIn.linkcolor});
}
// for these streams we want a user array in the header to build a profile card // for these streams we want a user array in the header to build a profile card
var addUserArray = ''; var addUserArray = '';
@ -626,9 +630,6 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) {
if(queet_data) { if(queet_data) {
// while waiting for this data user might have changed stream, so only proceed if current stream still is this one // while waiting for this data user might have changed stream, so only proceed if current stream still is this one
if(window.currentStream == stream) { if(window.currentStream == stream) {
// change design
changeDesign({backgroundimage:window.loggedIn.background_image, backgroundcolor:window.loggedIn.backgroundcolor, linkcolor:window.loggedIn.linkcolor});
// show group profile card if this is a group stream // show group profile card if this is a group stream
if(stream.substring(0,26) == 'statusnet/groups/timeline/' if(stream.substring(0,26) == 'statusnet/groups/timeline/'