Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024 10 11 1 #44

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Icon } from 'flavours/glitch/components/icon';
import {
selectSettingsNotificationsQuickFilterActive,
selectSettingsNotificationsQuickFilterAdvanced,
selectSettingsNotificationsQuickFilterShow,
} from 'flavours/glitch/selectors/settings';
import { useAppDispatch, useAppSelector } from 'flavours/glitch/store';

Expand Down Expand Up @@ -65,6 +66,11 @@ export const FilterBar: React.FC = () => {
const advancedMode = useAppSelector(
selectSettingsNotificationsQuickFilterAdvanced,
);
const useFilterBar = useAppSelector(
selectSettingsNotificationsQuickFilterShow,
);

if (!useFilterBar) return null;

if (advancedMode)
return (
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/flavours/glitch/features/ui/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Permalink } from 'flavours/glitch/components/permalink';
import { PictureInPicture } from 'flavours/glitch/features/picture_in_picture';
import { identityContextPropShape, withIdentity } from 'flavours/glitch/identity_context';
import { layoutFromWindow } from 'flavours/glitch/is_mobile';
import { selectUnreadNotificationGroupsCount } from 'flavours/glitch/selectors/notifications';
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';

import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
Expand Down Expand Up @@ -90,7 +91,7 @@ const mapStateToProps = state => ({
hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0,
canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4,
isWide: state.getIn(['local_settings', 'stretch']),
unreadNotifications: state.getIn(['notifications', 'unread']),
unreadNotifications: selectUnreadNotificationGroupsCount(state),
showFaviconBadge: state.getIn(['local_settings', 'notifications', 'favicon_badge']),
hicolorPrivacyIcons: state.getIn(['local_settings', 'hicolor_privacy_icons']),
moved: state.getIn(['accounts', me, 'moved']) && state.getIn(['accounts', state.getIn(['accounts', me, 'moved'])]),
Expand Down
56 changes: 0 additions & 56 deletions config/initializers/0_duplicate_migrations.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

# This migration is a duplicate of 20180831171112 and may get ignored, see
# config/initializers/0_duplicate_migrations.rb
# This migration is a duplicate of 20180831171112

class GlitchCreateBookmarks < ActiveRecord::Migration[5.1]
def up
return if table_exists?(:bookmarks)

class CreateBookmarks < ActiveRecord::Migration[5.1]
def change
create_table :bookmarks do |t|
t.references :account, null: false
t.references :status, null: false
Expand All @@ -19,4 +20,6 @@ def change

add_index :bookmarks, [:account_id, :status_id], unique: true
end

def down; end
end
11 changes: 8 additions & 3 deletions db/migrate/20180831171112_create_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

# This migration is a duplicate of 20180410220657 and may get ignored, see
# config/initializers/0_duplicate_migrations.rb
# This migration is a duplicate of 20180410220657

class CreateBookmarks < ActiveRecord::Migration[5.2]
def change
def up
return if table_exists?(:bookmarks)

create_table :bookmarks do |t|
t.references :account, null: false
t.references :status, null: false
Expand All @@ -19,4 +20,8 @@ def change

add_index :bookmarks, [:account_id, :status_id], unique: true
end

def down
drop_table :bookmarks
end
end
Loading