@ -113,7 +113,7 @@ export function fetchContext(id) {
|
||||
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
|
||||
|
||||
}).catch(error => {
|
||||
if (error.response.status === 404) {
|
||||
if (error.response && error.response.status === 404) {
|
||||
dispatch(deleteFromTimelines(id));
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ export function refreshTimelineFail(timeline, error, skipLoading) {
|
||||
timeline,
|
||||
error,
|
||||
skipLoading,
|
||||
skipAlert: error.response.status === 404,
|
||||
skipAlert: error.response && error.response.status === 404,
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,8 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
|
||||
intersectionObserverWrapper = new IntersectionObserverWrapper();
|
||||
|
||||
handleScroll = debounce((e) => {
|
||||
const { scrollTop, scrollHeight, clientHeight } = e.target;
|
||||
handleScroll = debounce(() => {
|
||||
const { scrollTop, scrollHeight, clientHeight } = this.node;
|
||||
const offset = scrollHeight - scrollTop - clientHeight;
|
||||
this._oldScrollPosition = scrollHeight - scrollTop;
|
||||
|
||||
@ -49,18 +49,22 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
componentDidMount () {
|
||||
this.attachScrollListener();
|
||||
this.attachIntersectionObserver();
|
||||
|
||||
// Handle initial scroll posiiton
|
||||
this.handleScroll();
|
||||
}
|
||||
|
||||
componentDidUpdate (prevProps) {
|
||||
// Reset the scroll position when a new toot comes in in order not to
|
||||
// jerk the scrollbar around if you're already scrolled down the page.
|
||||
if (prevProps.statusIds.size < this.props.statusIds.size &&
|
||||
prevProps.statusIds.first() !== this.props.statusIds.first() &&
|
||||
this._oldScrollPosition &&
|
||||
this.node.scrollTop > 0) {
|
||||
let newScrollTop = this.node.scrollHeight - this._oldScrollPosition;
|
||||
if (this.node.scrollTop !== newScrollTop) {
|
||||
this.node.scrollTop = newScrollTop;
|
||||
if (prevProps.statusIds.size < this.props.statusIds.size && this._oldScrollPosition && this.node.scrollTop > 0) {
|
||||
if (prevProps.statusIds.first() !== this.props.statusIds.first()) {
|
||||
let newScrollTop = this.node.scrollHeight - this._oldScrollPosition;
|
||||
if (this.node.scrollTop !== newScrollTop) {
|
||||
this.node.scrollTop = newScrollTop;
|
||||
}
|
||||
} else {
|
||||
this._oldScrollPosition = this.node.scrollHeight - this.node.scrollTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { unicodeToFilename } from './emojione_light';
|
||||
import { unicodeMapping } from './emojione_light';
|
||||
import Trie from 'substring-trie';
|
||||
|
||||
const trie = new Trie(Object.keys(unicodeToFilename));
|
||||
const trie = new Trie(Object.keys(unicodeMapping));
|
||||
|
||||
function emojify(str) {
|
||||
// This walks through the string from start to end, ignoring any tags (<p>, <br>, etc.)
|
||||
@ -19,10 +19,10 @@ function emojify(str) {
|
||||
insideTag = true;
|
||||
} else if (!insideTag && (match = trie.search(str.substring(i)))) {
|
||||
const unicodeStr = match;
|
||||
if (unicodeStr in unicodeToFilename) {
|
||||
const filename = unicodeToFilename[unicodeStr];
|
||||
if (unicodeStr in unicodeMapping) {
|
||||
const [filename, shortCode] = unicodeMapping[unicodeStr];
|
||||
const alt = unicodeStr;
|
||||
const replacement = `<img draggable="false" class="emojione" alt="${alt}" src="/emoji/${filename}.svg" />`;
|
||||
const replacement = `<img draggable="false" class="emojione" alt="${alt}" title=":${shortCode}:" src="/emoji/${filename}.svg" />`;
|
||||
str = str.substring(0, i) + replacement + str.substring(i + unicodeStr.length);
|
||||
i += (replacement.length - unicodeStr.length); // jump ahead the length we've added to the string
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ const emojione = require('emojione');
|
||||
|
||||
const mappedUnicode = emojione.mapUnicodeToShort();
|
||||
|
||||
module.exports.unicodeToFilename = Object.keys(emojione.jsEscapeMap)
|
||||
module.exports.unicodeMapping = Object.keys(emojione.jsEscapeMap)
|
||||
.map(unicodeStr => [unicodeStr, mappedUnicode[emojione.jsEscapeMap[unicodeStr]]])
|
||||
.map(([unicodeStr, shortCode]) => ({ [unicodeStr]: emojione.emojioneList[shortCode].fname }))
|
||||
.map(([unicodeStr, shortCode]) => ({ [unicodeStr]: [emojione.emojioneList[shortCode].fname, shortCode.slice(1, shortCode.length - 1)] }))
|
||||
.reduce((x, y) => Object.assign(x, y), { });
|
||||
|
@ -56,7 +56,7 @@
|
||||
"confirmations.mute.confirm": "ミュート",
|
||||
"confirmations.mute.message": "本当に{name}をミュートしますか?",
|
||||
"confirmations.unfollow.confirm": "フォロー解除",
|
||||
"confirmations.unfollow.message": "本当に{name}のフォローを解除しますか?",
|
||||
"confirmations.unfollow.message": "本当に{name}をフォロー解除しますか?",
|
||||
"emoji_button.activity": "活動",
|
||||
"emoji_button.flags": "国旗",
|
||||
"emoji_button.food": "食べ物",
|
||||
|
@ -55,8 +55,8 @@
|
||||
"confirmations.domain_block.message": "Czy na pewno chcesz zablokować całą domenę {domain}? Zwykle lepszym rozwiązaniem jest blokada lub wyciszenie kilku użytkowników.",
|
||||
"confirmations.mute.confirm": "Wycisz",
|
||||
"confirmations.mute.message": "Czy na pewno chcesz wyciszyć {name}?",
|
||||
"confirmations.unfollow.confirm": "Unfollow",
|
||||
"confirmations.unfollow.message": "Are you sure you want to unfollow {name}?",
|
||||
"confirmations.unfollow.confirm": "Przestań śledzić",
|
||||
"confirmations.unfollow.message": "Czy na pewno zamierzasz przestać śledzić {name}?",
|
||||
"emoji_button.activity": "Aktywność",
|
||||
"emoji_button.flags": "Flagi",
|
||||
"emoji_button.food": "Żywność i napoje",
|
||||
@ -111,8 +111,8 @@
|
||||
"notifications.column_settings.favourite": "Ulubione:",
|
||||
"notifications.column_settings.follow": "Nowi śledzący:",
|
||||
"notifications.column_settings.mention": "Wspomniali:",
|
||||
"notifications.column_settings.push": "Push notifications",
|
||||
"notifications.column_settings.push_meta": "This device",
|
||||
"notifications.column_settings.push": "Powiadomienia push",
|
||||
"notifications.column_settings.push_meta": "To urządzenie",
|
||||
"notifications.column_settings.reblog": "Podbili:",
|
||||
"notifications.column_settings.show": "Pokaż w kolumnie",
|
||||
"notifications.column_settings.sound": "Odtwarzaj dźwięk",
|
||||
@ -125,7 +125,7 @@
|
||||
"onboarding.page_one.handle": "Jesteś na domenie {domain}, więc Twój pełny adres to {handle}",
|
||||
"onboarding.page_one.welcome": "Witamy w Mastodon!",
|
||||
"onboarding.page_six.admin": "Administratorem tej instancji jest {admin}.",
|
||||
"onboarding.page_six.almost_done": "Prawie gotowe...",
|
||||
"onboarding.page_six.almost_done": "Prawie gotowe…",
|
||||
"onboarding.page_six.appetoot": "Bon Appetoot!",
|
||||
"onboarding.page_six.apps_available": "Są dostępne {apps} dla Androida, iOS i innych platform.",
|
||||
"onboarding.page_six.github": "Mastodon jest oprogramowaniem otwartoźródłwym. Możesz zgłaszać błędy, proponować funkcje i pomóc w rozwoju na {github}.",
|
||||
@ -151,7 +151,7 @@
|
||||
"report.target": "Zgłaszanie {target}",
|
||||
"search.placeholder": "Szukaj",
|
||||
"search_results.total": "{count, number} {count, plural, one {wynik} more {wyniki}}",
|
||||
"standalone.public_title": "A look inside...",
|
||||
"standalone.public_title": "Spojrzenie wgłąb…",
|
||||
"status.cannot_reblog": "Ten post nie może zostać podbity",
|
||||
"status.delete": "Usuń",
|
||||
"status.favourite": "Ulubione",
|
||||
@ -178,7 +178,7 @@
|
||||
"upload_area.title": "Przeciągnij i upuść aby wysłać",
|
||||
"upload_button.label": "Dodaj zawartość multimedialną",
|
||||
"upload_form.undo": "Cofnij",
|
||||
"upload_progress.label": "Wysyłanie...",
|
||||
"upload_progress.label": "Wysyłanie",
|
||||
"video_player.expand": "Przełącz wideo",
|
||||
"video_player.toggle_sound": "Przełącz dźwięk",
|
||||
"video_player.toggle_visible": "Przełącz widoczność",
|
||||
|
@ -36,7 +36,7 @@ function main() {
|
||||
|
||||
[].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {
|
||||
const datetime = new Date(content.getAttribute('datetime'));
|
||||
content.textContent = relativeFormat.format(datetime);;
|
||||
content.textContent = relativeFormat.format(datetime);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -4091,6 +4091,10 @@ button.icon-button.active i.fa-retweet {
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
noscript {
|
||||
text-align: center;
|
||||
|
||||
|
Reference in New Issue
Block a user