Commit 8bfd0179 authored by Eugen Rochko's avatar Eugen Rochko

Improve edge case handling

parent 6209e5b8
......@@ -36,7 +36,7 @@ class FriendsController < ApplicationController
begin
relationship = current_user.mastodon_client.perform_request(:post, "/api/v1/accounts/#{friend.relative_account_id}/follow")
friend.following = relationship['following'] || relationship['requested']
rescue HTTP::Error, OpenSSL::SSL::SSLError, Oj::ParseError
rescue HTTP::Error, OpenSSL::SSL::SSLError, Oj::ParseError, Mastodon::Error
next
end
end
......
......@@ -81,7 +81,7 @@ export default class HelloWorld extends React.PureComponent {
{interpolatingStyles => (
<div className='grid'>
{interpolatingStyles.map((style, i) => (
<a target='_blank' href={results[i].mastodon_url} style={{ transformOrigin: 'center center', transform: `scale(${style.scale})` }} key={results[i].mastodon_username} className='user-card' title={`@${results[i].twitter_username} on Twitter`}>
<a target='_blank' href={results[i].mastodon_url} style={{ pointerEvents: style.scale == 1 ? 'auto' : 'none', transformOrigin: 'center center', transform: `scale(${style.scale})` }} key={results[i].mastodon_username} className='user-card' title={`@${results[i].twitter_username} on Twitter`}>
<div className='avatar'><img src={results[i].avatar_url} /></div>
{results[i].following && <div className='following-indicator'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment