Skip to content

Commit

Permalink
removed notification when sending own post or DM, fixed hashtag searc…
Browse files Browse the repository at this point in the history
…hing and message about sending
  • Loading branch information
Simon Grim committed Feb 7, 2015
1 parent 09f4a64 commit 581d6c0
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 22 deletions.
3 changes: 1 addition & 2 deletions js/interface_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1316,8 +1316,7 @@ var postSubmit = function(e, oldLastPostId)
var tweetForm = $this.parents("form");
var remainingCount = tweetForm.find(".post-area-remaining");
remainingCount.text(140);
$replyText.attr("placeholder", "Your message was sent!");


if ($this.parents('.modal-wrapper').length) {
closeModal($this);
} else if ($this.parents('.prompt-wrapper').length) {
Expand Down
29 changes: 26 additions & 3 deletions js/interface_localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ if(preferredLanguage == "en"){
"Connections:": "Connections: ", // to network
"Connection lost.": "Connection lost.",
"days": "%{smart_count} day |||| %{smart_count} days",
"Desktop notifications": "Desktop notifications",
"Detailed information": "Detailed information",
"DHT network down.": "DHT network down.",
"Direct Messages": "Direct Messages",
Expand Down Expand Up @@ -192,6 +191,7 @@ if(preferredLanguage == "en"){
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -428,6 +428,8 @@ if(preferredLanguage == "es"){
"Ignore": "Ignorar",
"Theme": "Tema",
"Keys": "Teclas",
"Notifications": "Notificaciones",
"Desktop notifications": "Notificaciones de Escritorio",
"Sound notifications": "Notificaciones de Sonido",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -661,6 +663,8 @@ if(preferredLanguage == "uk"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -893,6 +897,8 @@ if(preferredLanguage == "zh"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -1126,6 +1132,8 @@ if(preferredLanguage == "nl"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -1356,6 +1364,8 @@ if(preferredLanguage == "it"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -1590,6 +1600,8 @@ if(preferredLanguage == "fr"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -1686,7 +1698,6 @@ if(preferredLanguage == "ru"){
"Connections:": "Соединений: ",
"Connection lost.": "Соединение с сетью было потеряно.",
"days": "%{smart_count} день |||| %{smart_count} дней",
"Desktop notifications": "Уведомления рабочего стола",
"Detailed information": "Подробная информация",
"DHT network down.": "Недоступна DHT сеть.",
"Direct Messages": "Личные сообщения",
Expand Down Expand Up @@ -1828,6 +1839,8 @@ if(preferredLanguage == "ru"){
"Ignore": "Игнорировать",
"Theme": "Тема",
"Keys": "Клавиши",
"Notifications": "Уведомления",
"Desktop notifications": "Уведомления рабочего стола",
"Sound notifications": "Звуковые уведомления",
"Send key": "Отправка сообщения",
"Posts display": "Отображение сообщений",
Expand Down Expand Up @@ -2067,7 +2080,9 @@ if(preferredLanguage == "de"){
"Ignore": "Ignorieren",
"Theme": "Theme",
"Keys": "Keys",
"Sound notifications": "Audioeinstellungen",
"Notifications": "Benachrichtigungen",
"Desktop notifications": "Desktophinweisen",
"Sound notifications": "Audioeinstellungen",
"Send key": "Send key",
"Posts display": "Posts display",
"Post editor": "Nachrichten-Editor",
Expand Down Expand Up @@ -2297,6 +2312,8 @@ if(preferredLanguage == "ja"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -2533,6 +2550,8 @@ if(preferredLanguage == "pt-BR"){
"Ignore": "Ignore",
"Theme": "Theme",
"Keys": "Keys",
"Notifications": "Notifications",
"Desktop notifications": "Desktop notifications",
"Sound notifications": "Sound notifications",
"Send key": "Send key",
"Posts display": "Posts display",
Expand Down Expand Up @@ -2756,6 +2775,8 @@ if(preferredLanguage == "tr"){
"Ignore": "Görmezden gel",
"Theme": "Tema",
"Keys": "Tuşlar",
"Notifications": "Uyarılar",
"Desktop notifications": "Masaüstü uyarılar",
"Sound notifications": "Sesli uyarılar",
"Send key": "Gönderme tuşu",
"Posts display": "Gönderiler",
Expand Down Expand Up @@ -2996,6 +3017,8 @@ if(preferredLanguage == "cs"){
"Ignore": "Ignorovat",
"Theme": "Styl grafiky",
"Keys": "Klávesy",
"Notifications": "Upozornění",
"Desktop notifications": "Upozornění na ploše",
"Sound notifications": "Zvuková upozornění",
"Send key": "Klávesa pro odeslání",
"Posts display": "Zobrazení příspěvků",
Expand Down
2 changes: 1 addition & 1 deletion js/twister_following.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ function userSearchKeypress(event) {
searchResults.slideUp( "fast" );

if ( event.which == 13 )
openHashtagModalFromSearch(partialName.substr(1));
window.location.hash = '#hashtag?hashtag=' + encodeURIComponent(partialName.substr(1));

return;
}
Expand Down
27 changes: 15 additions & 12 deletions js/twister_newmsgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,21 @@ function requestMentionsCount() {
if( _newDMsUpdated ) {
_newDMsUpdated = false;

$.MAL.soundNotifyDM();

var desktopNotification = new Notify(polyglot.t('notify_desktop_title'), {
body: 'You got '+polyglot.t('new_direct_messages', getNewDMsCount())+'.',
icon: '../img/twister_mini.png',
tag: 'twister_notification_new_DMs',
timeout: _desktopNotificationTimeout,
notifyClick: function() {
window.location.hash = '#directmessages';
}
});
desktopNotification.show();
var newDMs = getNewDMsCount();
if ( newDMs ) {
$.MAL.soundNotifyDM();

var desktopNotification = new Notify(polyglot.t('notify_desktop_title'), {
body: 'You got '+polyglot.t('new_direct_messages', newDMs)+'.',
icon: '../img/twister_mini.png',
tag: 'twister_notification_new_DMs',
timeout: _desktopNotificationTimeout,
notifyClick: function() {
window.location.hash = '#directmessages';
}
});
desktopNotification.show();
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions js/twister_timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ function processLastHave(userHaves)
function processNewPostsConfirmation(expected, posts)
{
//we don't want to produce alert for the posts that won't be displayed
var p2h = 0;
var pnp = 0;
for( var i = posts.length-1; i >= 0; i-- ) {
if (willBeHidden(posts[i])) {
p2h++;
if (willBeHidden(posts[i]) || posts[i]['userpost']['n'] === defaultScreenName) {
pnp++;
}
}
_newPostsPending += posts.length - p2h;
_newPostsPending += posts.length - pnp;
if( _newPostsPending ) {
$.MAL.reportNewPosts(_newPostsPending);
}
Expand Down

0 comments on commit 581d6c0

Please sign in to comment.