# Alterar lista de tópicos da página inicial do roteador - de Mais recentes para Seguindo

**URL:** <https://meta.discourse.org/t/change-topic-list-home-router-from-latest-to-following/169828>\
**Category:** Development\
**Created:** [Novembro 11, 2020, 2:06pm UTC](https://meta.discourse.org/t/change-topic-list-home-router-from-latest-to-following/169828 "2020-11-11T14:06:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![feabila](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@feabila](https://meta.discourse.org/u/feabila)\
**Post date:** [Novembro 11, 2020, 9:14pm UTC](https://meta.discourse.org/t/change-topic-list-home-router-from-latest-to-following/169828/3 "2020-11-11T21:14:53Z")

</div>

Olá, Robert! Alterei ambos os arquivos do PR que você mencionou.

- discourse/app/models/user\_option.rb
  - when 7 then “following”

- discourse/app/controllers/preferences/interface.js
  - Alterando a constante USER\_HOMES para adicionar “following”  
 ![Screen Shot 2020-11-11 at 18.08.20](https://global.discourse-cdn.com/meta/original/3X/d/a/da054837a2b7955c8fd4f6cda39c2c586c76ad4d.png)

Não funcionou. Achei que, com essas alterações, seria possível escolher as configurações do site “Top menu”. Então, se “latest” for obrigatório, eu colocaria “following” - “latest” em sequência, assim a home seria redirecionada para “following”.

Encontrei uma solução durante o desenvolvimento usando:

```
import { setDefaultHomepage } from 'discourse/lib/utilities';

```

Então, no meu componente, no início, adicionei:

```
setDefaultHomepage("following");

```

Isso porque no Rails Console encontrei uma variável **SiteSetting.homepage** que estava definida como “latest”.  
E funcionou 😃!

Você vê algum problema nisso?

Tenho medo de carregar “latest” do backend e que o initializer seja carregado no lado do cliente.

Atenciosamente,  
Felipe

---

_[View the full topic](https://meta.discourse.org/t/change-topic-list-home-router-from-latest-to-following/169828)._
