Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
fix: remember last position #243
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang committed Aug 8, 2022
1 parent 1edcf23 commit ca87e47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def do_resolve(blocks:, root_id:, operator_id:, deleted_ids:)
end

pod_id = current_pod.fetch('id')
current_user.save_last_position!(current_pod.fetch('username'), root_id)

insert_data = []
upsert_data = []
Expand Down
2 changes: 0 additions & 2 deletions apps/server-monolith/app/graphql/resolvers/block_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def resolve(id:, domain:)

return nil if !is_master && (permission.nil? || permission.disabled?)

current_user&.save_last_position!(domain, id)

result = {
title: block.title,
icon: block.icon,
Expand Down
3 changes: 3 additions & 0 deletions apps/server-monolith/app/graphql/resolvers/block_new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class BlockNew < BaseResolver
def resolve(id:, history_id: nil)
block = Docs::Block.find_by(id: id)
authorize! block, to: :show?

current_user&.save_last_position!(block.pod.username, block.id) if block

if history_id.present?
block.cur_history_id = history_id
end
Expand Down

0 comments on commit ca87e47

Please sign in to comment.